cleanup extra args logging / logic

This commit is contained in:
Greg T. Wallace 2024-02-02 18:35:20 -05:00
parent 3b611b06e4
commit d94a10b949
2 changed files with 3 additions and 7 deletions

View file

@ -15,8 +15,7 @@ const createDefaultOutFilePath = "apctool.p15"
func (app *app) cmdCreate(_ context.Context, args []string) error {
// extra args == error
if len(args) != 0 {
app.logger.Errorf("create: failed, extra args (%d) present", len(args))
return ErrExtraArgs
return fmt.Errorf("create: failed, %w (%d)", ErrExtraArgs, len(args))
}
// key must be specified