Minor fixes and tweaks
This commit is contained in:
@@ -124,7 +124,10 @@ func LoadCommands(args []string) ([]ModifyCommand, error) {
|
||||
logger.Info("Loading commands from arguments: %v", args)
|
||||
newcommands, err = LoadCommandFromArgs(args)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to load commands from args: %w", err)
|
||||
if len(commands) == 0 {
|
||||
return nil, fmt.Errorf("failed to load commands from args: %w", err)
|
||||
}
|
||||
logger.Warning("Failed to load commands from args: %v", err)
|
||||
}
|
||||
logger.Info("Successfully loaded %d commands from args", len(newcommands))
|
||||
commands = append(commands, newcommands...)
|
||||
@@ -166,7 +169,7 @@ func LoadCommandsFromCookFiles(s string) ([]ModifyCommand, error) {
|
||||
}
|
||||
|
||||
commands := []ModifyCommand{}
|
||||
cookFiles, err := doublestar.Glob(os.DirFS(cwd), "*.yaml")
|
||||
cookFiles, err := doublestar.Glob(os.DirFS(cwd), *Cookfile)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to glob cook files: %w", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user