Skip to content

Commit

Permalink
fix(unpack): set environment variable if already unpacked
Browse files Browse the repository at this point in the history
Ensure the environment variable is set when the file exists to
prevent possible issues with subsequent operations.
  • Loading branch information
steebchen committed Nov 11, 2024
1 parent affba97 commit fda08e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions binaries/unpack/unpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ func Unpack(data []byte, name string, version string) {
}

if _, err := os.Stat(file); err == nil {
if err := os.Setenv(FileEnv, file); err != nil {
panic(err)
}
logger.Debug.Printf("query engine exists, not unpacking. %s. at %s", time.Since(start), file)
return
}
Expand Down

0 comments on commit fda08e0

Please sign in to comment.