-
Notifications
You must be signed in to change notification settings - Fork 479
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
Implement windows-powershell setting #1057
Conversation
03acf78
to
da62db2
Compare
da62db2
to
6b22452
Compare
e662240
to
2f5040c
Compare
86e5203
to
ff2a43b
Compare
Hey @casey I finished the implementation of Happy new year! |
It's not a very satisfying answer, but I think if a whole bunch of tests start failing, the best thing to do is to uncomment/revert code until you they all pass/you get the previous behavior, and then start modifying it incrementally until you get failing tests. |
#1061 reminded me of something: If there are arguments that make powershell less error prone, we should pass them by default. So, for example, if there's something like |
cbb3d24
to
9405212
Compare
I don't think there is such an argument. I think I will add the |
@casey I changed the |
3e8a9a3
to
1804e99
Compare
I don't think the main justfile should be changed in this PR. In general, I try to keep PRs as small as possible, so they can be reviewed easily and merged quickly. Changing the main |
1804e99
to
348a243
Compare
I actually used this justfile for quite some time now. It works great - I never needed the parts that didn't work with PowerShell. But then I will keep it locally because I don't have the time to translate the whole justfile. Just as a sidenote: If variables would evaluate lazy (as soon as they are needed, and not before that) then the file in the current master would also work for most commands like |
I reverted the previous commit, so that the justfile now matches with the one from the current master again (meaning it's unchanged in this PR). I would consider the PR as ready for review now. Thanks to @Shemnei who worked with me on this feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this mostly looks good. Thanks for writing all the unit tests!
As for integration tests, there should be a new integration test dedicated to this feature, which I suggested in a comment, and none of the existing integration tests should change.
The reason being that when reviewing a PR like this, you really want to be sure that the feature works, and that nothing else changed. The easiest way to do this is to leave the existing tests alone, and write a new test that just covers the new feature.
Co-authored-by: Casey Rodarmor <[email protected]>
41ba8a7
to
82bf657
Compare
Co-authored-by: Casey Rodarmor <[email protected]>
82bf657
to
3871772
Compare
99c3331
to
b80a497
Compare
@casey Thanks for your review! I implemented all the changes. |
Co-authored-by: Jonas Grawe <[email protected]>
14b7b3c
to
d2da57f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting there!
src/settings.rs
Outdated
@@ -1,11 +1,17 @@ | |||
use crate::common::*; | |||
|
|||
pub(crate) const DEFAULT_SHELL: &str = "sh"; | |||
pub(crate) const DEFAULT_SHELL_ARG: &[&str] = &["-cu"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this conversation was accidentally marked as resolved. Since it's an array of strings, I would call it DEFAULT_SHELL_ARGS
even if there's only one.
cb39ee0
to
3736920
Compare
Done! |
Nice, merged! Thanks for sticking with it! This is a great feature, and long overdue. |
Thanks for reviewing! |
Implement the windows-powershell setting to fix #1050.
To be able to run the same justfile on Linux and Windows
set shell
is not enough because it would change the shell on every platform. To set PowerShell as the default shell when runningjust
on Windows setwindows-powershell
to true.