From b6357f0e0020679b35279fbe2d7b0bf1c11bd242 Mon Sep 17 00:00:00 2001 From: Darii Nurgaleev Date: Tue, 13 Oct 2020 21:02:57 +0700 Subject: [PATCH] removed relative path --- images.CI/shebang-linter.ps1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/images.CI/shebang-linter.ps1 b/images.CI/shebang-linter.ps1 index 3397f99d5..b950fd32f 100644 --- a/images.CI/shebang-linter.ps1 +++ b/images.CI/shebang-linter.ps1 @@ -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