Resolve check and freshen paths against the manifest's directory (closes #177)
check / check (push) Waiting to run

Without --base, check and freshen now look for a manifest's files in the
directory that holds it, the file named or the one found in a directory
argument, instead of the current directory. So `mfer check /media/drive`
checks a drive against its own index.mf from anywhere. check of a manifest
given by URL still uses the current directory, and --base still overrides,
even when it names the current directory. The --base help text of both
commands and the README's Tool Examples state the default; the README gains
a freshen entry for this.

Model: opus-5-5
This commit is contained in:
2026-10-07 14:29:13 +00:00
parent dce5e050c3
commit a2a4d97f2f
7 changed files with 157 additions and 9 deletions
+1 -2
View File
@@ -497,7 +497,6 @@ func (mfa *CLIApp) freshenManifestOperation(
) error {
log.Debug("freshenManifestOperation()")
basePath := cmd.String("base")
showProgress := cmd.Bool("progress")
// Find manifest file
@@ -512,7 +511,7 @@ func (mfa *CLIApp) freshenManifestOperation(
return err
}
absBase, err := filepath.Abs(basePath)
absBase, err := filepath.Abs(resolveBasePath(cmd, manifestPath))
if err != nil {
return fmt.Errorf("freshen: invalid base path: %w", err)
}