Skip to content

Commit 08458df

Browse files
yjp20cjquines
authored andcommitted
fix: dont crash when git user is not available
1 parent c10efcc commit 08458df

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

pkg/cmd/dev.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ func runDevMode(ctx context.Context, cmd *cli.Command) error {
264264

265265
gitUser, err := getGitUsername()
266266
if err != nil {
267-
return fmt.Errorf("failed to get git username: %v", err)
267+
Warn("Couldn't get a git user: %s", err)
268+
gitUser = "user"
268269
}
269270

270271
var selectedBranch string
@@ -416,11 +417,3 @@ func getCurrentGitBranch() (string, error) {
416417

417418
return branch, nil
418419
}
419-
420-
421-
422-
423-
424-
425-
426-

0 commit comments

Comments
 (0)