-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Improve handling of CTRL+C when dnx is used on Windows #49633
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
Changes from all commits
a96142c
4edf4ff
afc85c7
362c559
167845f
929dd9f
d9a4a51
223ea6e
5938094
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# dnx.ps1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we add a @Args was also added in 3.0 (2012 powershell). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like |
||
# PowerShell script to launch dotnet.exe with 'dnx' and all passed arguments | ||
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Users will need to select the ps1 script instead of the cmd, right? Is it ok that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you're running PowerShell, then the ps1 script will take precedence over the .cmd script. So either way you just type The only use of |
||
$dotnet = Join-Path $scriptDir 'dotnet.exe' | ||
& $dotnet dnx @Args | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the path contains a space, I think this might not work. But there is a different process for running an executable via a string, which I don't remember off the top of my head. That stuff can get pretty annoying in PowerShell. |
||
exit $LASTEXITCODE |
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 don't use PowerShell much and I just generated this script by asking copilot to translate the batch script to PowerShell. So I'd appreciate review of the script from someone more familiar with PowerShell.