Skip to content

Commit b22213a

Browse files
committed
fix(ccli): fix main program files creation in windows
1 parent 7dc899a commit b22213a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/ccli/repoinit/repoinit.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ func Run(settings Settings) error {
3737
}
3838
if err := spinner.Run("Create main program files", func() error {
3939
copyFile := func(source, destination string) error {
40-
templateFile, err := templatesFS.Open(filepath.Join("templates", source))
40+
templateFile, err := templatesFS.Open(path.Join("templates", source))
4141
if err != nil {
4242
return fmt.Errorf("failed to open template file: %w", err)
4343
}
4444
defer templateFile.Close()
45-
file, err := os.Create(path.Join(settings.Directory, destination))
45+
file, err := os.Create(filepath.Join(settings.Directory, destination))
4646
if err != nil {
4747
return fmt.Errorf("failed to create file: %w", err)
4848
}

0 commit comments

Comments
 (0)