Skip to content

Commit 778dc2c

Browse files
fix: Resolve prescript path before execution in prescript.ps1
1 parent ca03809 commit 778dc2c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/prescript.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ Write-Host '::group::Prescript - Execution'
1919

2020
# Check if the prescript is a path to an existing file
2121
if (Test-Path -Path $prescript -PathType Leaf) {
22-
Write-Host "Executing prescript from file: [$prescript]"
23-
& $prescript
22+
$scriptPath = Resolve-Path -Path $prescript
23+
Write-Host "Executing prescript from file: [$scriptPath]"
24+
& $scriptPath
2425
} else {
2526
Write-Host 'Executing inline prescript'
2627
# Use ScriptBlock::Create for safer execution than Invoke-Expression

0 commit comments

Comments
 (0)