Opened 10 years ago

Closed 9 years ago

#5084 closed defect (fixed)

Exit code from gmg

Reported by: anongoblin Owned by:
Priority: major Milestone:
Component: programming Keywords:
Cc: Parent Tickets:

Description

If I attempt to create a user that exists already by executing this command twice:

gmg adduser --username foo --password bar --email foo@bar.com

I get an error message at the second time: "Sorry, a user with that name already exists." but the exit code stays 0. This should be non-0, so it's easier to script this.

It may be worthwhile to check the exit codes of other gmg subcommands as well.

Change History (1)

comment:1 by berkerpeksag, 9 years ago

Resolution: fixed
Status: newclosed

Added in http://git.savannah.gnu.org/cgit/mediagoblin.git/commit/?id=47a2ab9cfccc255ccb0e96c3fedbf29f13c884f6

We could also print messages to stderr, but that's another issue.

Please open separate ticker for other GMG commands.

Thanks! :)

Note: See TracTickets for help on using tickets.