File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -347,14 +347,19 @@ func createRun(opts *CreateOptions) error {
347347 }
348348 } else {
349349 if opts .IO .CanPrompt () {
350- if ! createLocalDirectory {
350+ if ! createLocalDirectory && ( gitIgnoreTemplate == "" && repoLicenseTemplate == "" ) {
351351 err := prompt .Confirm (fmt .Sprintf (`Create a local project directory for "%s"?` , ghrepo .FullName (repo )), & createLocalDirectory )
352352 if err != nil {
353353 return err
354354 }
355+ } else if ! createLocalDirectory && (gitIgnoreTemplate != "" || repoLicenseTemplate != "" ) {
356+ err := prompt .Confirm (fmt .Sprintf (`Clone the remote project directory "%s"?` , ghrepo .FullName (repo )), & createLocalDirectory )
357+ if err != nil {
358+ return err
359+ }
355360 }
356361 }
357- if createLocalDirectory {
362+ if createLocalDirectory && ( gitIgnoreTemplate == "" && repoLicenseTemplate == "" ) {
358363 path := repo .RepoName ()
359364 checkoutBranch := ""
360365 if opts .Template != "" {
@@ -369,6 +374,11 @@ func createRun(opts *CreateOptions) error {
369374 if isTTY {
370375 fmt .Fprintf (stderr , "%s Initialized repository in \" %s\" \n " , cs .SuccessIcon (), path )
371376 }
377+ } else if createLocalDirectory && (gitIgnoreTemplate != "" || repoLicenseTemplate != "" ) {
378+ _ , err := git .RunClone (remoteURL , []string {})
379+ if err != nil {
380+ return err
381+ }
372382 }
373383 }
374384
You can’t perform that action at this time.
0 commit comments