Amadevus / pwsh-script

GitHub Action to run PowerShell scripts in a rich, prepared scope - inspired by actions/github-script.
MIT License
47 stars 8 forks source link

Error: Invoke-Expression : Cannot bind argument to parameter 'Path' because it is null. #23

Open krot4u opened 1 year ago

krot4u commented 1 year ago

Hi! When I run action and when the Run Amadevus/pwsh-script@v2 executes - there is an Error

Error: Invoke-Expression : Cannot bind argument to parameter 'Path' because it is null. At /home/runner/work/_actions/Amadevus/pwsh-script/v2/action.ps1:21 char:23 $Private:result = Invoke-Expression $Private:scriptFile


 CategoryInfo          : InvalidData: (:) [Invoke-Expression], ParameterBindingValidationException
FullyQualifiedErrorId : >ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.InvokeExpressionCommand

Error: Process completed with exit code 1.

Here is the Action yaml: ` name: Convert Contact List on: workflow_dispatch: schedule:

jobs: build: name: Run Script runs-on: ubuntu-latest steps: