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 the manifest, the file named or the one found in a directory argument, instead of the current directory. check of a manifest given by URL still uses the current directory, and a --base given on the command line, the current directory included, still overrides. The --base help text of both commands and the README's Tool Examples state the default; the README gains a freshen entry to do so. Model: opus-5-5
This commit is contained in:
@@ -497,7 +497,6 @@ func (mfa *CLIApp) freshenManifestOperation(
|
||||
) error {
|
||||
log.Debug("freshenManifestOperation()")
|
||||
|
||||
basePath := cmd.String("base")
|
||||
showProgress := cmd.Bool("progress")
|
||||
|
||||
// Find manifest file
|
||||
@@ -506,6 +505,13 @@ func (mfa *CLIApp) freshenManifestOperation(
|
||||
return fmt.Errorf("freshen: %w", err)
|
||||
}
|
||||
|
||||
// Without --base, the manifest's paths are resolved against the
|
||||
// directory holding it.
|
||||
basePath := filepath.Dir(manifestPath)
|
||||
if cmd.IsSet(flagBase) {
|
||||
basePath = cmd.String(flagBase)
|
||||
}
|
||||
|
||||
//nolint:contextcheck // mfer loads a manifest without a context
|
||||
existingByPath, err := mfa.loadExistingEntries(manifestPath)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user