From ff73e58a2cb97be6a17c10b912da9aa44b5911f8 Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Fri, 22 Jun 2018 16:51:23 -0600 Subject: [PATCH] Trim the suffix from the binary on Windows --- cmd/configure.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/configure.go b/cmd/configure.go index a9f392371..a9ac5c692 100644 --- a/cmd/configure.go +++ b/cmd/configure.go @@ -4,6 +4,7 @@ import ( "fmt" "os" "path" + "strings" "text/tabwriter" "github.com/exercism/cli/config" @@ -37,7 +38,7 @@ You can also override certain default settings to suit your preferences. } usrCfg.Normalize() if usrCfg.Workspace == "" { - dirName := path.Base(BinaryName) + dirName := strings.Replace(path.Base(BinaryName), ".exe", "", 1) defaultWorkspace := path.Join(usrCfg.Home, dirName) _, err := os.Stat(defaultWorkspace) // Sorry about the double negative.