File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,7 @@ jobs:
168168 path : ./
169169 format : ' cyclonedx-json'
170170 output-file : ' sbom.json'
171+ upload-artifact : false
171172
172173 - name : Upload SBOM as artifact
173174 uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change @@ -22,8 +22,21 @@ function Ensure-PSScriptAnalyzer {
2222}
2323
2424function Get-RepositoryRoot {
25- $scriptRoot = Split-Path - Path $MyInvocation.MyCommand.Path - Parent
26- return (Resolve-Path - Path (Join-Path - Path $scriptRoot - ChildPath ' ..' )).Path
25+ $scriptRoot = if ($PSScriptRoot ) {
26+ $PSScriptRoot
27+ }
28+ elseif ($PSCommandPath ) {
29+ Split-Path - Path $PSCommandPath - Parent
30+ }
31+ elseif ($MyInvocation.MyCommand.Path ) {
32+ Split-Path - Path $MyInvocation.MyCommand.Path - Parent
33+ }
34+ else {
35+ throw ' Unable to determine lint.ps1 location.'
36+ }
37+
38+ $rootPath = Join-Path - Path $scriptRoot - ChildPath ' ..'
39+ return (Resolve-Path - Path $rootPath ).Path
2740}
2841
2942function Get-FormatterTargets {
You can’t perform that action at this time.
0 commit comments