@@ -137,16 +137,16 @@ var localNewCmd = &console.Command{
137
137
if symfonyVersion != "" && c .Bool ("demo" ) {
138
138
return console .Exit ("The --version flag is not supported for the Symfony Demo" , 1 )
139
139
}
140
- if c .Bool ("webapp" ) && c .Bool ("no-git" ) {
141
- return console .Exit ("The --webapp flag cannot be used with --no-git" , 1 )
142
- }
143
140
if c .Bool ("webapp" ) && c .Bool ("api" ) {
144
141
return console .Exit ("The --api flag cannot be used with --webapp" , 1 )
145
142
}
146
143
withCloud := c .Bool ("cloud" ) || c .Bool ("upsun" )
147
144
if len (c .StringSlice ("service" )) > 0 && ! withCloud {
148
145
return console .Exit ("The --service flag cannot be used without --cloud or --upsun" , 1 )
149
146
}
147
+ if withCloud && c .Bool ("no-git" ) {
148
+ return console .Exit ("The --no-git flag cannot be used with --cloud or --upsun" , 1 )
149
+ }
150
150
151
151
s := terminal .NewSpinner (terminal .Stderr )
152
152
s .Start ()
@@ -178,11 +178,12 @@ var localNewCmd = &console.Command{
178
178
if c .Bool ("webapp" ) {
179
179
if err := runComposer (c , dir , []string {"require" , "webapp" }, c .Bool ("debug" )); err != nil {
180
180
return err
181
- }
182
- buf , err := git .AddAndCommit (dir , []string {"." }, "Add webapp packages" , c .Bool ("debug" ))
183
- if err != nil {
184
- fmt .Print (buf .String ())
185
- return err
181
+ } else if ! c .Bool ("no-git" ) {
182
+ buf , err := git .AddAndCommit (dir , []string {"." }, "Add webapp packages" , c .Bool ("debug" ))
183
+ if err != nil {
184
+ fmt .Print (buf .String ())
185
+ return err
186
+ }
186
187
}
187
188
}
188
189
0 commit comments