Skip to content

Commit

Permalink
fix: Windows only rmdir can delete junction
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhas committed Mar 31, 2019
1 parent 3486737 commit 11353d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func FindSymbol(debugInfo, content string, clues []string) []string {
func CreateJunction(location, destination string) error {
switch runtime.GOOS {
case "windows":
exec.Command("cmd", "/C", "del", "/F", destination).Run()
exec.Command("cmd", "/C", "rmdir", destination).Run()
return exec.Command("cmd", "/C", "mklink", "/J", destination, location).Run()
case "linux":
return exec.Command("ln", "-F", "-s", location, destination).Run()
Expand Down

0 comments on commit 11353d2

Please sign in to comment.