mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Move path manipulation to spec.Save
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -167,15 +167,7 @@ func (m command) run(c *cli.Context, cfg *config) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
path := cfg.output
|
||||
if filepath.Clean(filepath.Dir(path)) == "." {
|
||||
pwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get current working directory: %v", err)
|
||||
}
|
||||
path = filepath.Join(pwd, path)
|
||||
}
|
||||
return spec.Save(path)
|
||||
return spec.Save(cfg.output)
|
||||
}
|
||||
|
||||
func formatFromFilename(filename string) string {
|
||||
|
||||
Reference in New Issue
Block a user