Improve error handling during var resolution.

This commit is contained in:
jregan
2019-02-24 10:17:11 -08:00
committed by Jeffrey Regan
parent f8c80b7335
commit 6bfd7cff72
8 changed files with 150 additions and 44 deletions

View File

@@ -94,7 +94,7 @@ func (a *flagsAndArgs) ExpandFileSource(fSys fs.FileSystem) error {
if key != "" {
if len(result) != 1 {
return fmt.Errorf(
"'pattern '%s' catches files %v, should catch only one.", pattern, result)
"'pattern '%s' catches files %v, should catch only one", pattern, result)
}
fileSource := fmt.Sprintf("%s=%s", key, result[0])
results = append(results, fileSource)