Skip to content

Commit

Permalink
Trim the suffix from the binary on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Katrina Owen committed Jun 22, 2018
1 parent 5bbf936 commit ff73e58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"os"
"path"
"strings"
"text/tabwriter"

"github.com/exercism/cli/config"
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit ff73e58

Please sign in to comment.