Skip to content

Commit bb9468f

Browse files
🩹 [Patch]: Simplify path resolution by removing unnecessary string interpolation in main script
1 parent e78429e commit bb9468f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ā€Žscripts/main.ps1ā€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# If test type is module, the code we ought to test is in the path/name folder, otherwise it's in the path folder.
22
$settings = $env:PSMODULE_INVOKE_SCRIPTANALYZER_INPUT_Settings
33
$testPath = Resolve-Path -Path "$PSScriptRoot/tests/PSScriptAnalyzer" | Select-Object -ExpandProperty Path
4-
$codePath = Resolve-Path -Path "./$env:PSMODULE_INVOKE_SCRIPTANALYZER_INPUT_Path" | Select-Object -ExpandProperty Path
4+
$codePath = Resolve-Path -Path $env:PSMODULE_INVOKE_SCRIPTANALYZER_INPUT_Path | Select-Object -ExpandProperty Path
55
$settingsFilePath = switch -Regex ($settings) {
66
'Module|SourceCode' {
77
"$testPath/$settings.Settings.psd1"
88
}
99
'Custom' {
10-
Resolve-Path -Path "$env:PSMODULE_INVOKE_SCRIPTANALYZER_INPUT_SettingsFilePath" | Select-Object -ExpandProperty Path
10+
Resolve-Path -Path $env:PSMODULE_INVOKE_SCRIPTANALYZER_INPUT_SettingsFilePath | Select-Object -ExpandProperty Path
1111
}
1212
default {
1313
throw "Invalid test type: [$settings]"

0 commit comments

Comments
Ā (0)