Skip to content

Commit 9901d66

Browse files
fix(command): run failed on windows
1 parent 266c1ab commit 9901d66

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/LintCodeCommand.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ class LintCodeCommand extends Command
3333
public function handle()
3434
{
3535
$bin = $this->option('fix') ? 'phpcbf' : 'phpcs';
36-
$files = empty($this->argument('files')) ? [ '.' ] : $this->argument('files');
37-
36+
$files = empty($this->argument('files')) ? ['.'] : $this->argument('files');
37+
$command = "vendor" . DIRECTORY_SEPARATOR . "bin" . DIRECTORY_SEPARATOR . "$bin --standard=";
3838
exec(
39-
"vendor/bin/$bin --standard=" . $this->option('standard')
40-
. ' ' . implode(' ', $files),
39+
$command . $this->option('standard') . ' ' . implode(' ', $files),
4140
$output,
4241
$code
4342
);

0 commit comments

Comments
 (0)