-
Notifications
You must be signed in to change notification settings - Fork 12
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
Invalid character in Windows template filenames #1
Comments
@grovduck Thanks a lot for reporting this, and for figuring out the issue. I don't have a ton of experience with Copier myself, and I've apparently not tested it on Windows at all 🙈 I have a proposed fix in #2. Are you able to run a quick check on whether it resolves the issue? You can test it by running:
If this works as it should, I'll deploy it ASAP 😊 |
@gahjelle Thanks for the very quick fix. I can confirm that this command worked for me:
I struggled for a bit to get the bash shell script to work and had to do two different things (in case this helps others).
Here was the Bash script that worked for me:
Finally, I was able to do the same thing using PowerShell using this command:
Thanks so much for your help. Now to actually start on the puzzles! Please feel free to close the issue. |
THANK YOUUUU SOOO MUCHHH!! @grovduck I've been stuck on this error since yesterday. True example of 'not all heroes wear capes' |
Thank you again, @grovduck , I wholeheartedly agree with @psycho-baller . I have added your tips to the README as well, so that they will be easier to find for other Windows users. Happy Advent of Coding! |
@gahjelle @psycho-baller Y'all are much too kind. A tiny contribution to what @gahjelle has done here! |
Hi again @gahjelle! I'm using your awesome template generator again this year, but it looks like recent pushes may have reintroduced pipe characters ("|") into these filenames which is causing issues on Windows again:
I was able to get around it by renaming these files to:
Note that using |
Ah, yes, they changed the templating engine in the latest version of Copier, so I had to change the names and I forgot about pipes on windows. |
Thanks again @grovduck The filenames have been updated, so it should work again now. Thanks again for letting me know! |
Thanks @gahjelle, looks great! |
Great idea and really cool tutorial - thanks so much for this.
When I try to use this template on Windows using copier, I'm getting the following error:
From what I can tell, it doesn't accept the pipe character as a valid character in a Windows filename (although I'm not totally sure of this). If I replace
[['%02d'|format(day)]]
with[[formatted_day]]
and put an entry for[[formatted_day]]
in thecopier.yml
file, it seems to work fine. Here's an example of that: https://github.com/grovduck/test-template.Please let me know if I'm doing something incorrectly - it's my first time using copier!
The text was updated successfully, but these errors were encountered: