Skip to content

Commit

Permalink
Fixed tar.gz support on macOS/Windows (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
shyiko committed Oct 13, 2017
1 parent a8de8aa commit 143a28c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion command/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ func installOnDarwin(ver string, file string, fileType string, dest string) (err
switch fileType {
case "dmg":
err = installFromDmg(file, dest)
case "tgz":
err = installFromTgz(file, dest+"/Contents/Home")
case "zip":
err = installFromZip(file, dest+"/Contents/Home")
default:
Expand Down Expand Up @@ -309,6 +311,8 @@ func installOnWindows(ver string, file string, fileType string, dest string) (er
switch fileType {
case "exe":
err = installFromExe(file, dest)
case "tgz":
err = installFromTgz(file, dest)
case "zip":
err = installFromZip(file, dest)
default:
Expand All @@ -318,7 +322,7 @@ func installOnWindows(ver string, file string, fileType string, dest string) (er
err = assertJavaDistribution(dest)
}
if err != nil {
//os.RemoveAll(dest)
os.RemoveAll(dest)
}
return
}
Expand Down

0 comments on commit 143a28c

Please sign in to comment.