zanata-cli push ignores zanata.ini

Description

Description of problem:

zanata-cli requires the username and API key to be specified via command-line options even though they are specified in the zanata.ini file. The ini file has been used successfully with other commands.

Version-Release number of selected component (if applicable):

3.6.0

Actual results:

$ zanata-cli -e push
[INFO] Loading project config from zanata.xml
[INFO] Loading user config from /home/user/.config/zanata.ini
[INFO] Error stacktraces are turned on.
[ERROR] Execution failed:
org.zanata.client.exceptions.ConfigException: Username must be specified
at org.zanata.client.commands.OptionsUtil.checkMandatoryOptsForRequestFactory(OptionsUtil.java:293)
at org.zanata.client.commands.OptionsUtil.createRequestFactory(OptionsUtil.java:277)
at org.zanata.client.commands.PushPullCommand.<init>(PushPullCommand.java:95)
at org.zanata.client.commands.push.PushCommand.<init>(PushCommand.java:89)
at org.zanata.client.commands.push.PushOptionsImpl.initCommand(PushOptionsImpl.java:67)
at org.zanata.client.commands.ArgsUtil.runCommand(ArgsUtil.java:47)
at org.zanata.client.ZanataClient.processArgs(ZanataClient.java:170)
at org.zanata.client.ZanataClient.main(ZanataClient.java:95)
$ zanata-cli -e push --username username
[INFO] Loading project config from zanata.xml
[INFO] Loading user config from /home/user/.config/zanata.ini
[INFO] Error stacktraces are turned on.
[ERROR] Execution failed:
org.zanata.client.exceptions.ConfigException: API key must be specified
at org.zanata.client.commands.OptionsUtil.checkMandatoryOptsForRequestFactory(OptionsUtil.java:296)
at org.zanata.client.commands.OptionsUtil.createRequestFactory(OptionsUtil.java:277)
at org.zanata.client.commands.PushPullCommand.<init>(PushPullCommand.java:95)
at org.zanata.client.commands.push.PushCommand.<init>(PushCommand.java:89)
at org.zanata.client.commands.push.PushOptionsImpl.initCommand(PushOptionsImpl.java:67)
at org.zanata.client.commands.ArgsUtil.runCommand(ArgsUtil.java:47)
at org.zanata.client.ZanataClient.processArgs(ZanataClient.java:170)
at org.zanata.client.ZanataClient.main(ZanataClient.java:95)

Running the push with both the key and the username works.

Expected results:

The zanata.ini file should be used so that we don't need to supply the username and key again on the command line.

Environment

None

Assignee

Unassigned

Reporter

stephane@alum.mit.edu

Labels

Tested Version/s

None

Components

Priority

unspecified
Configure