8000 "Cannot bind parameter 'Option'" When running workflow · Issue #78 · SanjulaGanepola/github-local-actions · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

"Cannot bind parameter 'Option'" When running workflow #78

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

Closed
staffanhedstrom opened this issue Nov 25, 2024 · 4 comments · Fixed by #85
Closed

"Cannot bind parameter 'Option'" When running workflow #78

staffanhedstrom opened this issue Nov 25, 2024 · 4 comments · Fixed by #85
Labels
bug Something isn't working

Comments

@staffanhedstrom
Copy link
staffanhedstrom commented Nov 25, 2024

Hello!

This extension looked intriguing but I cannot get it to run. Act and Docker engine both show green.
image

But any workflow I try to run produces this error:

 *  Executing task: set -o pipefail; act --workflows ".github/workflows/myworkflow.yml" --job "tests" --secret-file "" --var-file "" --input-file "" --eventpath "" 2>&1 | tee "c:\Users\myuser\AppData\Roaming\Code\User\globalStorage\sanjulaganepola.github-local-actions\MyTest #1 - 20241125_145859.log" 


Set-Variable : Cannot bind parameter 'Option'. Cannot convert value "pipefail" to type "System.Management.Automation.ScopedItemOptions". Error: "Unable to match the identifier name pipefail to a valid enumer
ator name. Specify one of the following enumerator names and try again:
None, ReadOnly, Constant, Private, AllScope, Unspecified"
At line:1 char:8
+ set -o pipefail; act --workflows .github/workflows/development_landei ...
+        ~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Set-Variable], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.SetVariableCommand
 
Tee-Object : A positional parameter cannot be found that accepts argument 'and'.
At line:1 char:159
+ ... ath  2>&1 | tee c:\Users\myuser\AppData\Roaming\Code\User\globa ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Tee-Object], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.TeeObjectCommand
 

 *  The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command set -o pipefail; act --workflows ".github/workflows/myworkflow.yml" --job "tests" --secret-file "" --var-file "" --input-file "" --eventpath "" 2>&1 | tee "c:\Users\myuser\AppData\Roaming\Code\User\globalStorage\sanjulaganepola.github-local-actions\MyTest #1 - 20241125_145859.log"" terminated with exit code: 1. 

VS Code is run as admin.

@ChristopherHX
Copy link
Contributor

As far I can tell, the problem is this extension uses shellexecute with a bash script containing pipefail and the act command.

So windows seems to be broken via powershell as default shell

Linux and macOS should work at the moment.

I'm a nektos/act maintainer

@ChristopherHX
Copy link
Contributor

Made a pr for basic windows support
image

Log preservation and spaces in filenames are not supported, but something to play with

@SanjulaGanepola
Copy link
Owner

Hello @staffanhedstrom. Thank you for sharing this issue. I have a PR that I am testing and will merge soon. Will let you know when it is released.

@SanjulaGanepola
Copy link
Owner

@staffanhedstrom I just published a 1.1.2 release that contains the fix. Please let me know if you encounter the issue still.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants
0