Skip to content

Commit a07465d

Browse files
authored
Merge pull request #21 from selasibansa/v4.x
[FIX] Update cmd path issue
2 parents 2924081 + 8611ee5 commit a07465d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/CreateCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ protected function handle(): int
9999
$this->projectType ??= $scaffoldOptions['type'];
100100

101101
$commands = [];
102-
$directory = $this->projectName !== '.' ? getcwd() . '/' . $this->projectName : getcwd();
102+
$directory = path($this->projectName !== '.' ? getcwd() . '/' . $this->projectName : getcwd())->normalize();
103103

104104
if (!$this->option('force')) {
105105
$this->verifyApplicationDoesntExist($directory);
@@ -122,11 +122,11 @@ protected function handle(): int
122122
return 1;
123123
}
124124

125-
$commands[] = "cd '$directory'";
125+
$commands[] = "cd \"$directory\"";
126126
$commands[] = 'composer install --ansi';
127127
} else {
128-
$commands[] = "composer create-project leafs/mvc:v4.x-dev '$directory' --ansi";
129-
$commands[] = "cd '$directory'";
128+
$commands[] = "composer create-project leafs/mvc:v4.x-dev \"$directory\" --ansi";
129+
$commands[] = "cd \"$directory\"";
130130
}
131131

132132
if ($this->option('no-ansi')) {

0 commit comments

Comments
 (0)