Skip to content

Commit 36f7122

Browse files
🩹 [Patch]: Simplify settings file path resolution logic
1 parent 6c014ab commit 36f7122

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scripts/main.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ $codePath = Resolve-Path -Path $path | Select-Object -ExpandProperty Path
88
if (-not [string]::IsNullOrEmpty($env:PSMODULE_INVOKE_SCRIPTANALYZER_INPUT_SettingsFilePath)) {
99
try {
1010
Write-Host "Looking for settings file under $($pwd.Path)"
11-
$settingsFilePath = Resolve-Path -Path $env:PSMODULE_INVOKE_SCRIPTANALYZER_INPUT_SettingsFilePath -ErrorAction Stop |
12-
Select-Object -ExpandProperty Path
11+
$settingsFilePath = (Resolve-Path -Path $env:PSMODULE_INVOKE_SCRIPTANALYZER_INPUT_SettingsFilePath -ErrorAction Stop).Path
1312
Write-Information "Using settings file: $settingsFilePath"
1413
} catch {
1514
Write-Warning "Settings file not found at path: $($env:PSMODULE_INVOKE_SCRIPTANALYZER_INPUT_SettingsFilePath). Using default settings."

0 commit comments

Comments
 (0)