Skip to content

Commit

Permalink
don't bail on fresh install (no GE-Proton yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
intrand committed Oct 14, 2022
1 parent dc7ff96 commit aa803af
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ func installTarGzAsset(source string, destination string) (err error) {
return err
}

exist, err := exists(destination) // check if destination exists already
if err != nil {
return err
}

if !exist { // create destination if it doesn't
err = os.MkdirAll(destination, dirMode)
if err != nil {
return err
}
}

// use system `tar` to extract (cleanly handles symlinks, hardlinks, permissions, etc)
cmd := exec.Command("/usr/bin/tar", "xf", source, "-C", destination)
err = cmd.Run()
if err != nil {
Expand Down

0 comments on commit aa803af

Please sign in to comment.