Merge pull request #1704 from anderbubble/overlay-edit-file-path

Create temporary files in overlay directory during `wwctl overlay edit`
This commit is contained in:
Xu YANG
2025-02-06 13:11:39 +09:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- `wwctl node list <--yaml|--json>` outputs a map keyed by node name. #1667
- Don't mount /run during wwinit. #1566
- Simpler permissions in official RPM packages. #1696
- Create temporary files in overlay directory during `wwctl overlay edit`. #1473
### Fixed

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)
}