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

.clasp "rootDir" directive does not use a relative path and causes lots of issues/confusion #1009

Open
cleary opened this issue May 29, 2024 · 0 comments

Comments

@cleary
Copy link

cleary commented May 29, 2024

.clasp file:

{"scriptId":"XXXXXXXXXXXX-VG0d-XXXXXXXXXX-XXXXXXXXXXXXXXXX","rootDir":"/home/cleary/appscript/project1"}

Use case 1:

I have a clasp project on which there are two users working, and pushing changes to a git repo before deployment.

The .clasp file includes a "rootDir" directive for the project that is an absolute path including my username, which causes clasp pull to fail with a "Cound not write file." error (they have a different username of course).

Expected Behavior

I expect a collaborator to be able to git clone the repo, and be able to clasp pull with files landing in the correct (current) directory

Actual Behavior

Files are not written ("Could not write file."), because they are trying to write to another home directory altogether

Use case 2:

I have a clasp project at /home/cleary/appscript/project1/ and decide to rearrange my local directories, with the project1 folder moving to /home/cleary/source/project1/

Expected Behavior

I expect to clasp pull with files landing in the current directory

Actual Behavior

The files get written to the old path, and my current working directory does not get updated

Steps to Reproduce the Problem

  1. clasp pull a new project
  2. rename your project directory
  3. make a change in the remote appscript code editor
  4. clasp pull again, the updates are not applied in the current, renamed directory

Specifications

  • Node version (node -v): v12.22.9
  • Version (clasp -v): 2.4.2
  • OS (Mac/Linux/Windows): Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant