Skip to content

Commit

Permalink
- [X] Fix zoho:install to support Windows OS
Browse files Browse the repository at this point in the history
  • Loading branch information
aemaddin committed Mar 21, 2024
1 parent e19389b commit a696c33
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Commands/ZohoInstallCommand.php
Expand Up @@ -32,8 +32,15 @@ public function __construct()
public function handle()
{
$this->comment('Generate Zoho OAuth files ...');
Storage::disk('local')->put('zoho/oauth/logs/ZCRMClientLibrary.log', '');
Storage::disk('local')->put('zoho/oauth/tokens/zcrm_oauthtokens.txt', '');
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
// This is a server using Windows!
Storage::disk('local')->put('zoho\oauth\logs\ZCRMClientLibrary.log', '');
Storage::disk('local')->put('zoho\oauth\tokens\zcrm_oauthtokens.txt', '');
} else {
// This is a server not using Windows!'
Storage::disk('local')->put('zoho/oauth/logs/ZCRMClientLibrary.log', '');
Storage::disk('local')->put('zoho/oauth/tokens/zcrm_oauthtokens.txt', '');
}

$this->info('Zoho scaffolding installed successfully.');
}
Expand Down

0 comments on commit a696c33

Please sign in to comment.