fix: change save path log to be relative

This commit is contained in:
2026-03-25 21:37:08 +00:00
parent 526e31d0b0
commit 6fae05eb6f
11 changed files with 59 additions and 33 deletions
+9 -1
View File
@@ -2,6 +2,7 @@ package cmd
import (
"errors"
"os"
"path/filepath"
"mire/internal/mire"
@@ -28,7 +29,14 @@ func newRecordCommand() *cobra.Command {
return err
}
output.Println(createdPath)
displayPath := createdPath
if cwd, err := os.Getwd(); err == nil {
if relPath, err := filepath.Rel(cwd, createdPath); err == nil {
displayPath = relPath
}
}
output.Printf("Saved at %s\n", displayPath)
return nil
},
}