mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #5741 from yousong/automated-cherry-pick-of-#5740-upstream-release-3.1
Automated cherry pick of #5740: region: lbagents: fix returning error when glob has no match
This commit is contained in:
@@ -160,7 +160,7 @@ func (lbagent *SLoadbalancerAgent) deploy(ctx context.Context, userCred mcclient
|
||||
return nil, errors.WithMessagef(err, "glob error %s", pattern)
|
||||
}
|
||||
if len(matches) == 0 {
|
||||
return nil, errors.WithMessagef(err, "glob nomatch %s", pattern)
|
||||
return nil, errors.Errorf("no match for %q", pattern)
|
||||
}
|
||||
path := matches[len(matches)-1]
|
||||
name := filepath.Base(path)
|
||||
|
||||
Reference in New Issue
Block a user