Skip to content

Commit

Permalink
fix: check for existence of correct directory when appending a new mo…
Browse files Browse the repository at this point in the history
…dule
  • Loading branch information
alecthomas committed Nov 14, 2023
1 parent ae6fa53 commit a996136
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/ftl/cmd_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (i initKotlinCmd) Run(parent *initCmd) error {
i.Name = filepath.Base(i.Dir)
}

if _, err := os.Stat(filepath.Join(i.Dir, i.Name)); err == nil {
if _, err := os.Stat(filepath.Join(i.Dir, "ftl-module-"+i.Name)); err == nil {
return errors.Errorf("module directory %s already exists", filepath.Join(i.Dir, i.Name))
}

Expand Down

0 comments on commit a996136

Please sign in to comment.