Skip to content

Commit b943841

Browse files
committed
20220629E
1 parent 53622fc commit b943841

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

hugoalh.GitHubActionsToolkit/module/artifact.psm1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ Function Export-Artifact {
5656
}
5757
'Path' {
5858
ForEach ($ItemPath In $Path) {
59-
$PathsProceed += [String[]](Resolve-Path -Path ([System.IO.Path]::IsPathRooted($ItemPath) ? $ItemPath : (Join-Path -Path $BaseRoot -ChildPath $ItemPath)) -ErrorAction 'SilentlyContinue')
59+
Try {
60+
$PathsProceed += Resolve-Path -Path ([System.IO.Path]::IsPathRooted($ItemPath) ? $ItemPath : (Join-Path -Path $BaseRoot -ChildPath $ItemPath))
61+
} Catch {
62+
Write-Error -Message "``$ItemPath`` is not an exist and resolvable path!" -Category 'SyntaxError'
63+
}
6064
}
6165
}
6266
}

0 commit comments

Comments
 (0)