From a996136e054d257c1714b21928a5db5286f298d9 Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Tue, 14 Nov 2023 16:51:34 +1100 Subject: [PATCH] fix: check for existence of correct directory when appending a new module --- cmd/ftl/cmd_init.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/ftl/cmd_init.go b/cmd/ftl/cmd_init.go index bf51686d6a..9298108fba 100644 --- a/cmd/ftl/cmd_init.go +++ b/cmd/ftl/cmd_init.go @@ -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)) }