fix(saas): Don't overwrite config.toml if UUID already set (#1180)
* fix(saas): Don't overwrite config.toml if UUID already set * add a test case
This commit is contained in:
@@ -113,7 +113,7 @@ func (p *SaaSCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{})
|
||||
}
|
||||
|
||||
// Ensure UUIDs of scan target servers in config.toml
|
||||
if err := saas.EnsureUUIDs(p.configPath, res); err != nil {
|
||||
if err := saas.EnsureUUIDs(c.Conf.Servers, p.configPath, res); err != nil {
|
||||
util.Log.Errorf("Failed to ensure UUIDs. err: %+v", err)
|
||||
return subcommands.ExitFailure
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user