You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
argparse: do not rely on os.Exit() inside FlagSet.Parse()
When the internal 'FlagSet.Parse()' of an 'argparser' encounters an invalid
flag, the current 'ExitOnError' error handling causes it to invoke the
'os.Exit(2)' syscall and exit the program abruptly. In later patches, we're
going to want to "catch" that exit status in our logs, so change the error
handling to 'ContinueOnError' and explicitly call 'os.Exit(2)' in
'argparse.Parse()' if 'FlagSet.Parse()' returns an error.
Signed-off-by: Victoria Dye <[email protected]>
0 commit comments