@@ -60,13 +60,18 @@ protected function execute(InputInterface $input, OutputInterface $output)
60
60
61
61
$ cwd = sprintf ('%s/%s ' , $ this ->config ->home (), $ name );
62
62
$ file = sprintf ('%s/%s/project.yaml ' , $ this ->config ->home (), $ name );
63
+ $ dir = sprintf ('%s/%s/%s ' , $ _SERVER ['HOME ' ], $ this ->config ->projectsDir (), $ name );
63
64
64
65
if ($ git ) {
65
66
$ ret = $ this ->createFromGitRepo ($ git , $ cwd , $ file );
66
67
} else {
67
68
$ ret = $ this ->createNewLocalProject ($ cwd , $ file , $ name , $ docker , $ git );
68
69
}
69
70
71
+ if (!file_exists ($ dir )) {
72
+ @mkdir ($ dir , 0755 , true );
73
+ }
74
+
70
75
$ this ->tools ()->newline ();
71
76
72
77
return $ ret ;
@@ -127,7 +132,7 @@ protected function createFromGitRepo(string $git, string $cwd, string $file): in
127
132
128
133
$ name = Yaml::parseFile ($ file )['somnambulist ' ]['project ' ]['name ' ];
129
134
130
- $ this ->tools ()->success ('enable the project by running: <info>use %s</info> ' , $ name );
135
+ $ this ->tools ()->success ('enable the project by running: <info>spm use %s</info> ' , $ name );
131
136
132
137
return 0 ;
133
138
}
@@ -165,7 +170,7 @@ protected function createNewLocalProject(string $cwd, string $file, string $name
165
170
}
166
171
167
172
$ this ->tools ()->success ('created git repository at <info>%s</info> ' , $ cwd );
168
- $ this ->tools ()->success ('project created successfully, enable the project by running: <info>use %s</info> ' , $ name );
173
+ $ this ->tools ()->success ('project created successfully, enable the project by running: <info>spm use %s</info> ' , $ name );
169
174
170
175
return 0 ;
171
176
}
0 commit comments