Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local .clasprc.json Support #483

Closed
johnnyasantoss opened this issue Jan 8, 2019 · 10 comments
Closed

Local .clasprc.json Support #483

johnnyasantoss opened this issue Jan 8, 2019 · 10 comments

Comments

@johnnyasantoss
Copy link
Contributor

Expected Behavior

Be able to use only local .clasprc.json for CI environments

Actual Behavior

Ignores completely the local file and prefers the one on the user folder, which is not CI friendly.

Steps to Reproduce the Problem

  1. Move the file @ ~/.clasprc.json to ./ (your project folder)
  2. Try any command that needs authentication. eg. clasp versions, clasp deploy, etc...

Specifications

  • Node version (node -v): v10.13.0
  • Version (clasp -v): 1.7.0
  • OS (Mac/Linux/Windows): probably any but now I'm using Windows 10
@johnnyasantoss
Copy link
Contributor Author

It would be great if the one at the user folder would be something like a fallback/merge as .gitignore or .npmrc does.

@grant
Copy link
Contributor

grant commented Jan 25, 2019

Hey @johnnyasantoss, I hear you, but I think this issue is already being tracked in other issues.

Example:
#225

@grant grant closed this as completed Jan 25, 2019
@Luzifer
Copy link

Luzifer commented Mar 26, 2019

Having the same issue local .clasprc.json handling is fully broken.

This is broken since introduction of the local parameter here:

export async function loadAPICredentials(local = false): Promise<ClaspToken> {

As the local parameter is never set (and therefore is always false), the global config is always used.

This is not related to service account usage as described in #225 but a breakage introduced in 87a4810. @grant please re-open this and treat as a bug, not a feature-request.

@grant grant reopened this Mar 26, 2019
@grant grant changed the title Better clasprc handling Local .clasprc.json Support Mar 26, 2019
@grant
Copy link
Contributor

grant commented Mar 26, 2019

I've opened this issue asking for local credential support.

@leehen
Copy link

leehen commented May 11, 2020

Still has the same issue for 2.3.0. Any work around?

@Nu11u5
Copy link
Contributor

Nu11u5 commented May 14, 2020

This seems to be related to #42 and should probably be merged.

There was previously a discussion about adding a --local parameter here.

@cattermo
Copy link

cattermo commented Oct 8, 2020

I'm still running 1.7.0 due to this feature missing...

@PopGoesTheWza
Copy link
Collaborator

Try replacing @google/clasp 2.3.0 with forked-clasp which is more advanced: https://github.com/PopGoesTheWza/clasp/blob/forked/docs/config-files.md

npm uninstall -g @google/clasp
npm install -g forked-clasp

@PopGoesTheWza PopGoesTheWza added the forked-clasp fixed in forked-clasp label Mar 19, 2021
@PopGoesTheWza PopGoesTheWza removed the forked-clasp fixed in forked-clasp label May 12, 2021
@PopGoesTheWza
Copy link
Collaborator

@digfish
Copy link

digfish commented May 31, 2022

On 2.4.1 on Windows 10 the error persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants