-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix shell setting precedence (#1306)
- Loading branch information
Showing
8 changed files
with
130 additions
and
84 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Cross platform shebang: | ||
shebang := if os() == 'windows' { | ||
'powershell.exe' | ||
} else { | ||
'/usr/bin/env pwsh' | ||
} | ||
|
||
# Set shell for non-Windows OSs: | ||
set shell := ["powershell", "-c"] | ||
|
||
# Set shell for Windows OSs: | ||
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"] | ||
|
||
# If you have PowerShell Core installed and want to use it, | ||
# use `pwsh.exe` instead of `powershell.exe` | ||
|
||
linewise: | ||
Write-Host "Hello, world!" | ||
|
||
shebang: | ||
#!{{shebang}} | ||
$PSV = $PSVersionTable.PSVersion | % {"$_" -split "\." } | ||
$psver = $PSV[0] + "." + $PSV[1] | ||
if ($PSV[2].Length -lt 4) { | ||
$psver += "." + $PSV[2] + " Core" | ||
} else { | ||
$psver += " Desktop" | ||
} | ||
echo "PowerShell $psver" |
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
This file was deleted.
Oops, something went wrong.
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