gocardless / cli-releases

Release repo for the gocardless cli
Apache License 2.0
4 stars 3 forks source link

[BUG]: CLI config file parameter not working #25

Open JamesSills-OnfocusTech opened 9 months ago

JamesSills-OnfocusTech commented 9 months ago

Describe the bug When using the CLI you should be able to change the config file by using the before documented parameter:

https://developer.gocardless.com/cli-reference/gc/ --config string config file (default is $HOME/.gc-cli/config.json)

This isn't working and always takes the default config file.

To Reproduce Steps to reproduce the behavior:

  1. Install GC CLI
  2. Login gc login
  3. Check current user is logged in gc config current-session
  4. Copy the file from the default directory to a new location e.g. $HOME/.gc-cli/config.json to C:\
  5. Check current user is logged in gc config current-session --config C:\config.json
  6. Result is You do not have an active session, create one by running 'gc login'\n

Expected behavior Step 3 and 5 in the above should return the same result.

Screenshots

C:\>gc config current-session --config 'C:\config.json'
You do not have an active session, create one by running 'gc login'\n

C:\>gc config current-session --config 'config.json'
You do not have an active session, create one by running 'gc login'\n

C:\>gc config current-session --config config.json
You do not have an active session, create one by running 'gc login'\n

C:\>

Desktop