Skip to content

Commit

Permalink
fix: don't fail ftl new if there's no git repo (#1859)
Browse files Browse the repository at this point in the history
Fixes #1848
  • Loading branch information
safeer authored Jun 21, 2024
1 parent 97767a0 commit 9964a96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/ftl/cmd_new.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ func (i newGoCmd) Run(ctx context.Context) error {
return err
}

logger.Debugf("Adding files to git")
if !config.NoGit {
_, ok := internal.GitRoot(i.Dir).Get()
if !config.NoGit && ok {
logger.Debugf("Adding files to git")
if config.Hermit {
if err := maybeGitAdd(ctx, i.Dir, "bin/*"); err != nil {
return err
Expand Down

0 comments on commit 9964a96

Please sign in to comment.