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
"dotnet new mini-scaffold" on Linux strips execute bit from build.sh #19
Comments
Hmm I haven't tried |
My home computer has dotnet 1.0.1 (which I apparently installed on February 28th and forgot about until now), so I was able to try with 1.0.1. Doing so produced the amusing result that every file had the execute bit set! Specifically, running |
Related: https://github.com/dotnet/coreclr/issues/11232 There are several other related issues and PRs in the coreclr repo, but I'm currently on a mobile phone so it's a bit difficult to reference all of them. I'll add more details when I get back to a computer. But basically, the 1.0 tools set the execute bit everywhere, and a PR was created to fix that bug by not setting the execute bit at all. I'm not yet sure if the tools have access to the needed information to correctly set the execute bit only on the files for which it was set in the Git repo. I haven't yet been able to tell if templates can specify execute bits in some way, so I'll keep this issue open until I'm sure it can't be fixed by templates. |
It looks like the ultimate cause of this issue is NuGet/Home#4424. Comments in that issue's thread say that the relevant bug has been fixed, but that that fix didn't make it into the Meanwhile, I think it's safe to close this particular issue since there's nothing you need to change in the template, as far as I know. If the |
Thanks for the investigation! |
For dotnet new, we're looking at ways of preserving or setting permissions on generated content here dotnet/templating#1028 |
The build.sh file checked into the Git repo has the execute bit properly set, but after I run
dotnet new -i "MiniScaffold::*"
and thendotnet new mini-scaffold
, the resulting files have build.sh without the execute bit. This is just a minor annoyance as it's easy to immediately runchmod +x build.sh
, but if it can be fixed in the template that would be nice.I rather suspect, though, that this is a limitation in the dotnet templating engine, in which case you can't fix it in the template. If that's the case, feel free to just close this issue. :-)
System info:
Dotnet version: 2.0.0-preview2-006497
OS version: Linux Mint 18.1 (based on Ubuntu Xenial 16.04)
The text was updated successfully, but these errors were encountered: