-
Notifications
You must be signed in to change notification settings - Fork 12k
build: require administrator elevation #370
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
Comments
I'm not really sure there is such a feature in Windows Otherwise I'm not sure how we could programatically elevate the current console. |
I didn't implement it myself yet, but I found something which does the desired elevation. So, the best command flow, would be, to request for permission elevation and then re-execute the given But this seems to be a bit weird:
Additionally, you're depending on some .NET libraries, which is also not very nice. |
The equivalent of a I 'm not sure whether applicable here |
@devversion as far as I can, the second option is doing the same as what @anode7 suggested. The I can't say it's a priority right now, but I'll leave the issue open for when there is a bit more time. |
I'm coming in fresh here and did not investigate why admin privileges are needed, but is there no option to stay away from needing admin privileges altogether? I'm working in a workplace environment where getting admin rights on my machine will be tough to get...I'm probably not the only one who would face issues with needing admin rights. |
@samherrmann I believe admin privileges are because the broccoli-typescript compiler creates symbolic links as part of the compilation process, and symbolic links can't be created without administrator privileges, or at least group policy changes, as per Ember's guide: http://ember-cli.com/user-guide/#symlinks-on-windows |
I am in the same situation as @samherrmann, i.e. its very unlikely I'm going to be allowed the privileges for creating symlinks (but I am fighting for them!). In the ember guide link above it says:
As we don't want to exclude corporate environments perhaps this is the best solution. |
@samherrmann and @cwmrowe , check out this post: It's a bit hacky, but if you replace line 206 of node_modules/angular-cli/lib/broccoli-typescript with the following, it will fall back to copying files to a lib folder in the root of your project.
I've done it and can verify that it works for me. It does significantly slow down the build process (from about 1 second on my personal laptop to about 25 seconds on my work desktop, although there's a huge difference in specs between the machines too), but it works just fine otherwise. You'll still get the message about not having admin, but it'll work. |
cheers @alexkibler, that got me most of the way but you also need to add that same bit of code to line 81 of the same file if you want It's also worth mentioning that I the Do you know if this code will be included in the CLI? |
@cwmrowe Great point, you definitely want to modify the project-level folder. Interesting that you had to change line 81 because mine works without changing it. I hope it ends up getting included, as we'll have to re-patch it every time the CLI team pushes an update. |
Just wanted to report in and say that I had our infrastructure lead give me rights to create symlinks, and it is working. My build time went down from 30-ish seconds to 13. |
Anyone know the impact of exception handling on speed? I just created a '_useSymlink' property I set to true in the constructor and set to false on the first error, then I just do the copy if it is false instead of the symlink from then on... |
In case of non-admin user instead of symlinkSync will just writeFileSync. Close angular#905 Fix angular#886 Fix angular#370
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Hey, I recently switched back to Windows and now I've noticed that massive build time impact without Administrator Privileges.
I know this bug has been already reported several times and is actually related to the
ember-cli
project.So now, I'm asking for something like a feature request. For example, when I use
Webstorm
's embedded terminal, then I don't have administrator privileges, and that means the build is very slow.I thought about something like an Administrator Elevation, which will be called, when using the CLI on Windows without administrator privileges.
That means, the default
Run as Administrator
prompt will appear, and the build can run with elevated permissions.Not sure, about this being a duplicate, but it should be fine.
The text was updated successfully, but these errors were encountered: