Create temporary files in overlay directory during wwctl overlay edit

- Fixes: #1473

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-02-05 20:27:55 -07:00
parent 36dca0dfa3
commit 05923d4044
2 changed files with 2 additions and 1 deletions

View File

@@ -48,7 +48,7 @@ func CobraRunE(cmd *cobra.Command, args []string) (err error) {
return fmt.Errorf("%s does not exist. Use '--parents' option to create automatically", overlayFileDir)
}
tempFile, tempFileErr := os.CreateTemp("", "ww-overlay-edit-")
tempFile, tempFileErr := os.CreateTemp(overlay_.Path(), "ww-overlay-edit-")
if tempFileErr != nil {
return fmt.Errorf("unable to create temporary file for editing: %s", tempFileErr)
}