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

project is read-only #146

Closed
3 tasks done
sverhoeven opened this issue May 29, 2024 · 2 comments · Fixed by #174
Closed
3 tasks done

project is read-only #146

sverhoeven opened this issue May 29, 2024 · 2 comments · Fixed by #174
Assignees
Labels
bug Something isn't working package Relates to the package, not the template
Milestone

Comments

@sverhoeven
Copy link
Collaborator

Description

I ran

using COPIERTemplate
COPIERTemplate.generate("YourPackage.jl")

The file permissions are read-only, I expected it to use my umask.

  • YourPackage/ has drwxr-xr-x
  • YourPackage/README.md has -r--r--r--
  • YourPackage/src has drwxr-xr-x
  • YourPackage/test/Project.toml -r--r--r--

Package Version

0.3.1

Julia Version

1.10

Reproduction steps

  1. I installed Julia using juliaup
  2. Start console with ~/.juliaup/bin/julia
  3. Ran command from description
  4. The permissions of files in YourPackage/ are not correct

When I use copier it self it has correct permssions

python3 -m venv venv
. venv/bin/activate
pip install copier
copier copy https://github.com/abelsiqueira/COPIERTemplate.jl YourPackage.jl

Then the permissions are user writable (-rw-r--r--) as I expected.

I am running on Windows inside WSL on a Ubuntu 22.04 .

I fixed the permissions with

find YourPackage.jl -type f -exec chmod u+w {} \;

Relevant log output

No response

Operating System

Linux

Checks

@sverhoeven sverhoeven added the bug Something isn't working label May 29, 2024
@abelsiqueira abelsiqueira added this to the 0.5.0 - Hack & Feed 1 milestone May 29, 2024
@abelsiqueira abelsiqueira added the package Relates to the package, not the template label May 29, 2024
@sverhoeven
Copy link
Collaborator Author

sverhoeven commented May 29, 2024

Installing with

 pkg> activate .
 pkg> add https://github.com/abelsiqueira/COPIERTemplate.jl#main

also gives wrong permission

@sverhoeven
Copy link
Collaborator Author

At https://github.com/copier-org/copier/blob/ffceb0a2bfc76f09a21e2f9858b7025e658fd258/copier/main.py#L622C15-L622C46 the permission of the template file is used to set the project file permissions.

The template files are somewhere in ~/.julia with -r--r--r-- permissions.

sverhoeven added a commit that referenced this issue May 29, 2024
Instead of using the copier.yml from ~/.julia/** use GH url.

Fixes #146
@abelsiqueira abelsiqueira modified the milestones: 0.5.0, 0.4.0 May 30, 2024
@abelsiqueira abelsiqueira self-assigned this May 30, 2024
abelsiqueira added a commit that referenced this issue May 31, 2024
If the argument is passed, copy from that location, otherwise use the URL.

BREAKING CHANGE: The default API now clones from the URL, which means
that even if you clone the repo and run the generate command, it will
use the latest tagged version.

Fixes #146 

Co-authored-by: Abel Soares Siqueira <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package Relates to the package, not the template
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants