Skip to content

Commit

Permalink
cpu: set TMPDIR environment variable to /tmp
Browse files Browse the repository at this point in the history
Set the TMPDIR environment variable to /tmp, always.

Signed-off-by: Ronald G. Minnich <[email protected]>
  • Loading branch information
rminnich committed May 16, 2024
1 parent 9158db3 commit be60d4b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmds/cpu/cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,12 @@ func main() {
}
}
verbose("Running as client, to host %q, args %q", host, a)
// The remote system, for now, is always Linux or a standard Unix (or Plan 9)
// It will never be darwin (go argue with Apple)
// so /tmp is *always* /tmp
if err := os.Setenv("TMPDIR", "/tmp"); err != nil {
log.Printf("Warning: could not set TMPDIR: %v", err)
}

*keyFile = getKeyFile(host, *keyFile)
*port = getPort(host, *port)
Expand Down

0 comments on commit be60d4b

Please sign in to comment.