Skip to content

Commit 4f00243

Browse files
authored
Merge pull request #481 from warrensbox/480-file-extension-exe-on-windows-doubled-in-version-120
fix: Remove duplicate .exe extension added to paths for windows inside symlink, as this is already handled by ConvertExecutableExt
2 parents 98eac38 + 0f9cc73 commit 4f00243

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/symlink.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ func CreateSymlink(cwd string, dir string) error {
2020
}
2121
defer r.Close()
2222

23-
w, err := os.Create(dir + ".exe")
23+
w, err := os.Create(dir)
2424
if err != nil {
25-
return fmt.Errorf("Could not create target binary: %q.exe", dir)
25+
return fmt.Errorf("Could not create target binary: %q", dir)
2626
}
2727
defer func() {
2828
if c := w.Close(); err == nil {

lib/symlink_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func TestCreateSymlink(t *testing.T) {
4848
CreateSymlink(symlinkPathDest, symlinkPathSrc)
4949

5050
if runtime.GOOS == "windows" {
51-
_, err := os.Stat(symlinkPathSrc + ".exe")
51+
_, err := os.Stat(symlinkPathSrc)
5252
if err != nil {
5353
t.Logf("Could not stat file copy at %v. [unexpected]", symlinkPathSrc)
5454
t.Error("File copy was not created.")

0 commit comments

Comments
 (0)