mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-06 18:17:26 +08:00
added comments
This commit is contained in:
@@ -26,8 +26,10 @@ function Validate-Scripts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$ScriptsWithBrokenShebang = @()
|
$ScriptsWithBrokenShebang = @()
|
||||||
|
# Check Ubuntu contains required shebang string
|
||||||
$ScriptsWithBrokenShebang += Validate-Scripts -Path $path1 -Pattern "#!/bin/bash -e"
|
$ScriptsWithBrokenShebang += Validate-Scripts -Path $path1 -Pattern "#!/bin/bash -e"
|
||||||
$ScriptsWithBrokenShebang += Validate-Scripts -Path $path2 -Pattern "#!/bin/bash -e"
|
# Check MacOS contains required shebang string
|
||||||
|
$ScriptsWithBrokenShebang += Validate-Scripts -Path $path2 -Pattern "#!/bin/bash -e -o pipefail"
|
||||||
if ($ScriptsWithBrokenShebang.Length -gt 0) {
|
if ($ScriptsWithBrokenShebang.Length -gt 0) {
|
||||||
$ScriptsWithBrokenShebang | ForEach-Object {
|
$ScriptsWithBrokenShebang | ForEach-Object {
|
||||||
Write-Warning "The following script does not contain shebang: '$_'"
|
Write-Warning "The following script does not contain shebang: '$_'"
|
||||||
|
|||||||
Reference in New Issue
Block a user