twitchdev/twitch-cli

--config not implemented yet?

Closed this issue · 2 comments

Running the Linux bin: twitch-cli_1.1.5_Linux_x86_64.tar.gz

In twitch -h there is talk about a --config param, but when I try to use it, it appears to be ignored and the default location is used.

Flags:
      --config string   config file (default is $HOME/.twitch-cli/.twitch-cli.env)
  -h, --help            help for twitch

Command run to set the config file:
twitch token --config "/.twitch-cli.env"

What am I doing wrong?

PS, the default config location is also incorrect in the -h text, it's: $HOME/.config/twitch-cli/.twitch-cli.env (at least in the linux binary).

Xemdo commented

Hi,
I tested this and it seems to be working. Your custom .env file should contain something like this:

CLIENTSECRET=<client secret token>
CLIENTID=<client id token>

Then run the command such as you did.

I've noticed in your command, it says "/.twitch-cli.env", which will look for it at the root. Make sure this is expected and not a typo for the local "./.twitch-cli.env". which contains the dot at the start of the location to make it relative.

Hi Xemdo,
Yeah, root dir / is expected, this is running inside a docker container.

I think I've misunderstood the purpose of --config, I thought it was just to specify where the config file would be saved to, not data retrieved from.

Anyway, thank you for the clarification.