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

Keep permissions from original files when doing the scaffolding #29

Open
ulises-jeremias opened this issue Oct 1, 2023 · 0 comments
Open
Labels
bug Something isn't working Hacktoberfest

Comments

@ulises-jeremias
Copy link
Member

ulises-jeremias commented Oct 1, 2023

Describe the bug

When doing the scaffolding of the project the command is not keeping the original permissions from the files in the templates.

For example, when using the extensions to add husky, the generated .husky/pre-commit file won't be have execution permissions causing the pre-commit hook to be skipped

Expected Behavior

Keep the permissions from the original file from the templates and extensions

Current Behavior

The files are not keeping the expected permissions

Reproduction Steps

Create a new project with the tool using the following configuration:

  • Package manager: any
  • App type: Frontend Application
  • Template: React Vite Boilerplate
  • Extensions: Husky + Lint Staged

Then moved to the generated project and check the permissions for the files inside .husky/

image

Possible Solution

Seems to be a problem in the places where we are using this function here without passing the correct permissions.

We need to fix this behavior when writing files from templates or append files

Additional Information/Context

No response

Version used

0.4.20

Environment details (OS name and version, etc.)

Environment Info:

  System:
    OS: Linux 6.1 Arch Linux
    CPU: (8) x64 Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz
    Memory: 24.52 GB / 31.12 GB
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 18.17.0 - /run/user/1000/fnm_multishells/403345_1696141910500/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 9.6.7 - /run/user/1000/fnm_multishells/403345_1696141910500/bin/npm
    pnpm: 8.7.6 - /run/user/1000/fnm_multishells/403345_1696141910500/bin/pnpm
    Watchman: Not Found
  Browsers:
    Chrome: Not Found
@ulises-jeremias ulises-jeremias added bug Something isn't working Hacktoberfest labels Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Hacktoberfest
Projects
None yet
Development

No branches or pull requests

1 participant