clasp login` fails with `--creds` option
(Note: Non-breaking issues are likely not to be prioritized. Please consider a PR in addition to your issue)
Expected Behavior
Success clasp login --creds creds.json and it is able to log in with my own credential.
Actual Behavior
Run clasp login --creds creds.json and get the following error message.
Logging in locally...
No valid .clasp.json project file. You may need to `create` or `clone` a project first.
Steps to Reproduce the Problem
- Go to APIs & Services > Credentials of my GCP project.
- Create OAuth 2.0 Client IDs (with type of Desktop)
- Download the credential json file
- run
npm i clasp -gand install clasp globally - run
clasp login --creds path_to_credential.json
Specifications
- Node version (
node -v): v12.13.0 - Version (
clasp -v): 2.3.0 - OS (Mac/Linux/Windows): Mac
@saito-ya can you test with the #791 unofficial release?
npm uninstall -g @google/clasp && npm install -g forked-clasp
clasp --version
# should be 2.4.0 or more
Intended behavior to require an existing project. --creds is really only used to set up auth for the run command and it does some other things in the associated GCP project.
Since it's a bit more specialized than the login command implies, may revisit this in 3.0 and break it out to a separate command to configure the run command.