Skip to content

Commit 6ebe08d

Browse files
authored
Avoid letting the clone command panic if no gh command (#45)
1 parent 5eba315 commit 6ebe08d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/clone.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ func (o *cloneOption) runE(_ *cobra.Command, args []string) (err error) {
6969
if err = survey.AskOne(prompt, &ok); err == nil && ok {
7070
err = pkg.ExecCommandInDir(ghBinary, targetDir, "repo", "fork", "--remote")
7171
}
72+
} else {
73+
// it's ok if no gh found
74+
err = nil
7275
}
7376
return
7477
}

0 commit comments

Comments
 (0)