clasp
clasp copied to clipboard
`clasp run` instructions for authentication could use reworking
(Note: Non-breaking issues are likely not to be prioritized. Please consider a PR in addition to your issue)
Expected Behavior
When running clasp run without the proper scopes we need to set the scopes required. I would expect the instructions to either link to documentation in setting the scopes explicitly.
Actual Behavior
Currently in the output when scopes are not set correctly we get the following (after running a clasp helloWorld:
$ clasp run helloWorld
(node:61428) ExperimentalWarning: The fs.promises API is experimental
Running in dev mode.
Hey! It looks like you aren't authenticated for the scopes required by this script.
Please enter the scopes by doing the following:
1. Open Your Script: ...
2. File > Project Properties > Scopes
3. Copy/Paste the list of scopes here:
~ Example ~
https://mail.google.com/
https://www.googleapis.com/auth/presentations
----(When you're done, press <Enter> 2x)----
This led me to going to File > Project Properties > Scopes expecting me to set them there but instead we actually need to explicitly set them in the manifest file in appsscript.json. As mentioned in the docs here.
Steps to Reproduce the Problem
- Run a script function without proper scopes set (any new project) e.g.
clasp helloWorld
Specifications
- Node version (
node -v): v10.13.0 - Version (
clasp -v): 2.3.0 - OS (Mac/Linux/Windows): Mac
Is this strictly a documentation issue? Can anyone volunteer for a PR?
I'm noticing the same behavior
Bump. Same.