-
-
Notifications
You must be signed in to change notification settings - Fork 395
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
docs: Add PowerShell example #3857
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
46ef6e8
Add powershell example
jahanson 91fafa6
[autofix.ci] apply automated fixes
autofix-ci[bot] ad3ccd8
Merge branch 'jdx:main' into patch-1
jahanson 6c06669
docs: improve docs from code for powershell
jahanson e0fbb1a
[autofix.ci] apply automated fixes
autofix-ci[bot] f806eae
Merge branch 'main' into patch-1
jdx 514a4e2
[autofix.ci] apply automated fixes
autofix-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
is the ampersand a typo?
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.
No, this invokes the command in a non-blocking way. Background Operator
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.
why would we want that here? Isn't that going to cause the output to not even be parsed by powershell? even if it was, wouldn't it mean the next command might not have the tools setup?
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'm also confused why it's at the beginning here but more so why we would want to background this
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.
$(mise activate pwsh) | Out-String | Invoke-Expression
works just the same. But it seemsInvoke-Expression -Command $(mise activate pwsh | Out-String)
causes an issue with the parameter length. So the piping is preferred.We can change it to
$(mise activate pwsh) | Out-String | Invoke-Expression
if it is preferred.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.
that's what @fgilcc put in the readme and we should at least be consistent. I think we should stick with what @fgilcc has unless they think we should do something different.
If we do want to change it then it would need to happen everywhere in the docs.
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.
You know, I didn't even see it in the README to be honest. Sorry about that. I'm up for either approach. I'm just personally a fan of modifying my own profile script instead of a script adding it to the end. In the end, I was just following the style of the other nearby examples. I hadn't even thought to look outside the docs.
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.
same here, although with mise it actually is important that it gets loaded last or else the tools might not be in the front of PATH so it's good guidance for us to just tell users to put it at the end