This repository was archived by the owner on Aug 11, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55from paperspace .cli .cli import cli
66from paperspace .commands import login as login_commands
77
8- LOGIN_DEPRECATION_MESSAGE = """The login command is currently disabled for logging in with `--email` and `--password`.
8+ LOGIN_DEPRECATION_MESSAGE = """The login command is currently disabled for logging in using `--email` and `--password`.
99
10- Instead, obtain an API Key from https://www.paperspace.com/console/account/api and then use the `apiKey` command to store your API Key.
10+ Instead, obtain an API Key from https://www.paperspace.com/console/account/api.
11+
12+ Then use the `apiKey` command to save your API Key locally.
1113
1214Visit the docs @ https://docs.paperspace.com for more info!"""
1315
@@ -39,7 +41,7 @@ def logout():
3941
4042
4143@cli .command ("apiKey" , help = "Save your api key" )
42- @click .argument ("api_key" , required = False , callback = common .prompt_for_secret ("API Key: " ))
44+ @click .argument ("api_key" , required = False , callback = common .prompt_for_secret ("Enter your API Key: " ))
4345def save_api_key (api_key ):
4446 command = login_commands .SetApiKeyCommand ()
4547 command .execute (api_key )
Original file line number Diff line number Diff line change @@ -125,6 +125,8 @@ def set_apikey(apikey):
125125 json .dump (config_data , outfile , indent = 2 , sort_keys = True )
126126 outfile .write ('\n ' )
127127
128+ logger .log ("Successfully added API Key to {}. You're ready to go!" .format (config_path ))
129+
128130 return True
129131
130132
You can’t perform that action at this time.
0 commit comments