Skip to content

Commit ff73e58

Browse files
author
Katrina Owen
committed
Trim the suffix from the binary on Windows
1 parent 5bbf936 commit ff73e58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/configure.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55
"os"
66
"path"
7+
"strings"
78
"text/tabwriter"
89

910
"github.com/exercism/cli/config"
@@ -37,7 +38,7 @@ You can also override certain default settings to suit your preferences.
3738
}
3839
usrCfg.Normalize()
3940
if usrCfg.Workspace == "" {
40-
dirName := path.Base(BinaryName)
41+
dirName := strings.Replace(path.Base(BinaryName), ".exe", "", 1)
4142
defaultWorkspace := path.Join(usrCfg.Home, dirName)
4243
_, err := os.Stat(defaultWorkspace)
4344
// Sorry about the double negative.

0 commit comments

Comments
 (0)