fix: create user tmp directory before the app one (#2395)

Otherwise on a shared machine, the `/tmp/k9s` directory will be owned by
the first user to lanch `k9s` command. The other users will get a
"permission denied" error.
mine
Nicolas Karolak 2023-12-28 00:51:03 +01:00 committed by GitHub
parent 736f6bfaa5
commit f5f3278e17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -282,7 +282,7 @@ func userTmpDir() (string, error) {
return "", err
}
dir := filepath.Join(os.TempDir(), AppName, u.Username)
dir := filepath.Join(os.TempDir(), u.Username, AppName)
return dir, nil
}