summaryrefslogtreecommitdiff
path: root/usage.go
diff options
context:
space:
mode:
authorAlex Flint <[email protected]>2023-02-08 06:13:50 -0800
committerGitHub <[email protected]>2023-02-08 06:13:50 -0800
commit5dbdd5d0c585feef8723223464a9362d635324f6 (patch)
treec2db08470fe80424bf7b52fe082d837452b8bdf9 /usage.go
parentc0a8e20a0ac9e8a9dbb0e078b0befd8e28302e8b (diff)
parentefae1938fd6c8434532ca7527cd90752e558d377 (diff)
Merge pull request #210 from cabuda/master
feat: support more env than terminal
Diffstat (limited to 'usage.go')
-rw-r--r--usage.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/usage.go b/usage.go
index 7a480c3..80eba45 100644
--- a/usage.go
+++ b/usage.go
@@ -39,9 +39,9 @@ func (p *Parser) FailSubcommand(msg string, subcommand ...string) error {
// failWithSubcommand prints usage information for the given subcommand to stderr and exits with non-zero status
func (p *Parser) failWithSubcommand(msg string, cmd *command) {
- p.writeUsageForSubcommand(stderr, cmd)
- fmt.Fprintln(stderr, "error:", msg)
- osExit(-1)
+ p.writeUsageForSubcommand(p.stderr, cmd)
+ fmt.Fprintln(p.stderr, "error:", msg)
+ p.osExit(-1)
}
// WriteUsage writes usage information to the given writer