Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
krot4u opened this issue Sep 12, 2023 · 0 comments

Comments

@krot4u
Copy link

krot4u commented Sep 12, 2023

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:
- cron: "* */3 * * *"

jobs:
build:
name: Run Script
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

  - uses: Amadevus/pwsh-script@v2
    id: script
    env:
      GH_TOKEN: ${{ github.token }}
    with:
      script: |
        # ------ AnyTone ------ #
        $DMRIdsContent = Get-Content ./DMRIds.dat

  - name: Update files in repository
    uses: actions-x/commit@v6
    with:
      email: "[email protected]"
      name: GitHub Actions Autocommitter
      branch: master
      files: Devices_Contact_List/*
      repository: https://github.com/${{ github.repository }}
      token: ${{ github.token }}
      force: true

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant