-
Notifications
You must be signed in to change notification settings - Fork 384
Fix for wrong shell in Windows #407
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
Conversation
|
Why |
|
You may have missed the issue link in #371, but #345 is the main ticket for this - it has some solutions similar to yours, including being a bit more careful and defaulting to If you want to update this to include the concerns folks bring up in #345 that might be helpful though. Thanks! |
|
Thanks. I will take a look a try to update this pull request. |
|
Any progress on this? It's 4-5 lines in a single file, and this is stopping invoke from running on Windows since 0.13(!) I got bit by this one again when trying to introduce invoke to a new project: I'm betting I'm not the only one trying to hunt down why invoke can't find |
|
@thebjorn Thanks for pushing me into fixing it ;) @bitprophet I need some help with all checks that are set for this project (to pass them or you will merge it without codecoverage fixes) and If you need some more documentation please let me know what and where should be added. |
|
@mkusz thanks for your hard work on this. The configure fix is useful, thx. |
|
@thebjorn My solution was incomplete. Bellow is fixed one: |
|
@bitprophet I do not understand why codecov/patch is not green. Please help with it (I have added you to this branch/fork so you can fix it there). |
|
@mkusz looks like GitHub doesn't recognize the authorship of your commits, probably because they're made with a value of |
|
@NickVolynkin @mkusz @bitprophet I might be wrong, but the codecov/patch looks like it has sub-average (94.19%) coverage due to the coverage not being ran on a windows machine (thus not exercising the new code paths). This does not indicate a problem with the patch (if anything it is a bug in the coverage setup -- which should normally combine coverage from runs on all platforms). I can't see any reason why this PR can't be merged now, as-is. Please release a new version to PyPI when this PR has been merged.. |
|
@thebjorn Travis run all tests on Windows and they are passing ;) |
|
@mkusz Surely not Travis, that's linux only as far as I know (view the configs from https://travis-ci.org/pyinvoke/invoke/builds/277335648, they all say |
|
@thebjorn Yes you are right about Travis/Linux and AppVeyour/Windows. I misplaced them. As for coverage I do not understand what's happening and do not have enough time for it. If someone is interested to help, I can give assess to my fork for this PR. |
|
@mkusz I don't believe there's anything you can do (short of adding enough no-op lines that will be hit on linux and thus bring the coverage up). The "bug" here is in the appveyor setup which doesn't report coverage to codecov.io. The appveyor issue ought to be fixed, for sure, but shouldn't be a stopper for this PR, which, and I feel like I'm repeating myself here.., fixes a problem that prevents invoke from running on Windows. Yes, there are workarounds -- mine being perhaps the ugliest, but also perhaps the easiest to work with (https://github.com/datakortet/dk-tasklib/blob/master/dktasklib/wintask.py) -- but none of the workarounds are mentioned in the README or the documentation, so for all intents and purposes invoke is broken on windows for new users since 0.13. I would really appreciate if @bitprophet would just merge this PR now and release a new version to PyPI.. Pretty please? With sugar on top..? |
Updating pytest version (otherwise the setup.cfg tools:pytest section is not read on windows).
|
So where are we at on getting this fixed? Has it been given up on? If so, why? I'd like to try to help get it fixed. Also, what's with all the extra stuff going on just to get the proper shell in Windows? |
|
It needs some attention from @bitprophet since, from my point of view it's ready, but for unknown reasons checks are not passing (possible error with code coverage testing on Windows). If you see what can be changed please let me know and I can give you write access to my fix branch. |
|
Nope, yours looks good other than you should probably update the changelog. I'm gonna delete mine. Hopefully it gets approved soon because it opens up full support for Windows without having to do anything quirky, and at least to me, that sounds like a benefit worth approving quickly. |
|
Sincerest apologies for letting this moulder on the vine, been trying not to get bogged down in bugfixes while sprinting on feature related work :( but that pendulum has definitely swung too far in that direction at this point. Will merge this as-is and hope its current state is sufficient for most Windows users; we can make new issues for anything else outstanding and/or the appveyor problem. |
|
I lied, did a bunch of cleanup tweaks first. End behavioral result should be the same, however - COMSPEC if it contains cmd.exe (also: why wouldn't we trust a useful shell exe in COMSPEC even if it doesn't end with literal cmd.exe? Don't care enough for now, but...) else literal cmd.exe. |
|
Appveyor seems happy at this point I'll put this up on PyPI as 0.22.0 (which will include another bugfix and drop old Python versions) once 1-2 folks from this thread give me a +1 that latest master still works well for them. Thanks! |
|
@bitprophet My man! And I agree, there's no reason to even check
I'm definitely leaning towards the former, because generally anyone with a non-default COMSPEC value very purposefully changed it, and we should trust that they knew what they were doing and give them the shell they want. Tag for inclusion: @mkusz |
|
PR #496 submitted to use the first solution. |
|
Thanks for the feedback on that! I took a slightly different approach to the same end & also added you to the changelog (I knew I'd forgotten at least one person...). See below (or...above...depending on when Github gets all of this.) |
|
Thanks, I appreciate it! Glad this all got taken care of and that invoke is now Win compatible by default, plus invoke got a nice little clean up from you as well. |
|
0.22.0 is on PyPI. Of minor note, realized afterwards that if any of y'all are (or plan to) using the Fabric 2 alpha for SSH stuff, this change will cause some issues for you until fabric/fabric#1686 is solved. |
Fix for #371 which was closed because of workaround. It seems that fixing it is very simple. Take a look into this pull request code.