clasp icon indicating copy to clipboard operation
clasp copied to clipboard

clasp run doesn't use ~/.clasprc.json and requires .clasprc.json in local directory

Open maisondelamitie opened this issue 2 years ago • 0 comments

(Note: Non-breaking issues are likely not to be prioritized. Please consider a PR in addition to your issue)

Expected Behavior

Use ~/.clasprc.json by default

Actual Behavior

Error message when running clasp run: (ENOENT) Error: ENOENT: no such file or directory, open '[localdir]/.clasprc.json'

Steps to Reproduce the Problem

  1. authenticate clasp, resulting in a ~/.clasprc.json file
  2. from some random directory, clone a project using clasp clone
  3. in that same directory, run clasp run function
  4. clasp does connect to console.developers.google.com but then looks for a local .clasprc.json and fails.
  5. note that specifying the path to the ~/.clasprc.json file doesn't work either. Specifying only -A ~ results in authentication failing ("Could not read API credentials. Are you logged in globally?")

Specifications

  • Node version (node -v): v17.5.0
  • Version (clasp -v): 2.4.1
  • OS (Mac/Linux/Windows): Mac

maisondelamitie avatar Mar 29 '22 15:03 maisondelamitie