Resolve check and freshen paths against the manifest's directory (closes #177)
check / check (push) Waiting to run
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:
@@ -299,6 +299,10 @@ func (mfa *CLIApp) checkManifestOperation(
|
||||
return fmt.Errorf("check: %w", err)
|
||||
}
|
||||
|
||||
// Done before a URL is swapped for the temp file it is downloaded to,
|
||||
// whose directory is not the base.
|
||||
basePath := resolveBasePath(cmd, manifestPath)
|
||||
|
||||
// URL manifests need to be downloaded to a temp file for the checker
|
||||
if isHTTPURL(manifestPath) {
|
||||
tmpPath, tmpErr := mfa.fetchManifestToTemp(ctx, manifestPath)
|
||||
@@ -311,7 +315,6 @@ func (mfa *CLIApp) checkManifestOperation(
|
||||
manifestPath = tmpPath
|
||||
}
|
||||
|
||||
basePath := cmd.String("base")
|
||||
showProgress := cmd.Bool("progress")
|
||||
|
||||
log.Infof("checking manifest %s with base %s", manifestPath, basePath)
|
||||
|
||||
Reference in New Issue
Block a user