Skip to content

Commit 35daab0

Browse files
authored
Fix place to return the value
1 parent 49ad9cd commit 35daab0

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Src/PowerShell/entrypoint.ps1

+5-1
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,13 @@ function main {
5555

5656
# Get all actions
5757
$actions = LoadAllActionsFromConfiguration
58+
if ($null -eq $actions) {
59+
Write-Error "Could not find any actions"
60+
throw
61+
}
5862

5963
# write the file outside of the container so we can pick it up
60-
Write-Host "Found [$($actions.Count)] actions "
64+
Write-Host "Found [$($actions.Count)] actions"
6165
$jsonObject = ($actions | ConvertTo-Json -Depth 10 -Compress)
6266

6367
# store the json in a file and write the path to the output variable

Src/PowerShell/load-used-actions.ps1

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ param (
1010
# pull in central calls library
1111
. $PSScriptRoot\github-calls.ps1
1212

13-
1413
function GetActionsFromWorkflow {
1514
param (
1615
[string] $workflow,
@@ -252,7 +251,9 @@ function LoadAllActionsFromConfiguration() {
252251

253252
# todo: store the json file
254253
#UploadActionsDataToGitHub -actions $actionsFound -marketplaceRepo $marketplaceRepo -PAT $PAT -repositoryName $repositoryName -repositoryOwner $repositoryOwner
254+
255+
return $summarizeActions
255256
}
256257

257-
return $summarizeActions
258+
return $null
258259
}

0 commit comments

Comments
 (0)