Skip to content

Commit 9f0701c

Browse files
committed
Fix: Error where the composer diagnostics output file couldn't be written because it goes into program files.
Fixed by specifying the valet home path, so it gets saved to `~/.config/valet`
1 parent 75a64d4 commit 9f0701c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cli/Valet/Diagnose.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(CommandLine $cli, Filesystem $files) {
3939
'php --ri curl',
4040
'cmd /C curl --version',
4141
'cat "' . pathFilter(COMPOSER_GLOBAL_PATH) . '/composer.json"',
42-
'composer global diagnose --no-ansi 1> composer.txt',
42+
'composer global diagnose --no-ansi 1>' . VALET_HOME_PATH . '/composer.txt',
4343
'composer global outdated --format json'
4444
];
4545
}
@@ -183,8 +183,8 @@ protected function editOutput($command, $output) {
183183
}
184184

185185
if (str_contains($command, "composer global diagnose")) {
186-
$output = $this->cli->powershell('cat composer.txt');
187-
$this->files->unlink('composer.txt');
186+
$output = $this->cli->powershell('cat '. VALET_HOME_PATH .'/composer.txt');
187+
$this->files->unlink(VALET_HOME_PATH .'/composer.txt');
188188
}
189189

190190
if (str_contains($command, "composer global outdated")) {

0 commit comments

Comments
 (0)