mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 22:26:56 +00:00
removed relative path
This commit is contained in:
@@ -9,14 +9,13 @@ function Validate-Scripts {
|
||||
)
|
||||
$ScriptWithoutShebangLine = @()
|
||||
Get-ChildItem $path -Recurse -File -Filter "*.sh" | ForEach-Object {
|
||||
$RelativePath = Join-Path $Path $($_.Name)
|
||||
$shebangLine = Get-Content -Path $RelativePath | Select-Object -First 1
|
||||
$shebangLine = Get-Content -Path $($_.FullName)| Select-Object -First 1
|
||||
if ($shebangLine -eq $ExpectedShebang) {
|
||||
Write-Host "Pattern '$ExpectedShebang' found in '$RelativePath'"
|
||||
Write-Host "Pattern '$ExpectedShebang' found in '$($_.FullName)'"
|
||||
}
|
||||
else {
|
||||
Write-Host "Pattern '$ExpectedShebang' not found in '$RelativePath'"
|
||||
$ScriptWithoutShebangLine += $RelativePath
|
||||
Write-Host "Pattern '$ExpectedShebang' not found in '$($_.FullName)'"
|
||||
$ScriptWithoutShebangLine += $($_.FullName)
|
||||
}
|
||||
}
|
||||
return $ScriptWithoutShebangLine
|
||||
|
||||
Reference in New Issue
Block a user