treasure-data / td

CUI Interface
https://toolbelt.treasuredata.com
49 stars 26 forks source link

The message for `td apikey:set -f` can be misleading if env vars TREASURE_DATA_API_KEY or TD_API_KEY are set #12

Open kiyoto opened 11 years ago

kiyoto commented 11 years ago

Env variables override "td apikey:set -f", i.e., whatever new apikey you set would not replace the one set by the env variable.

This behavior is intended, but the associated message is kind of misleading:

$ td apikey:set

API key is set. Use 'td db:create ' to create a database.

When, in reality, API key is not set to .

takkanm commented 9 years ago

@kiyoto Currently, td apikey:set -f will display an error message.

$ TD_API_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX td apikey:set -f
usage:
 $ td apikey:set <apikey>

description:
 Set Treasure Data API key

options:
 -f, --force                      overwrite current account setting

Is this, would be the behavior you want?

kiyoto commented 9 years ago

@takkanm At least it should have a warning. But wow, someone is working on an issue from 2.5 years ago!

takkanm commented 9 years ago

Settings from the environment variable can not be, what are you expected that the effect of the message appears as a warning?