slack-orb icon indicating copy to clipboard operation
slack-orb copied to clipboard

Orb should work even if the default shell is not bash

Open martin-displayr opened this issue 2 years ago • 2 comments

Orb version:

4.12.5

What happened:

When using a Windows runner and Powershell as the shell for the job, the orb fails:

eval : The term 'eval' is not recognized as the name of a cmdlet, function, script file, or operable program. Check 
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:6 char:1
+ eval printf '%s' "$SLACK_SCRIPT_NOTIFY"
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (eval:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 

Exited with code exit status 1

Expected behavior:

You can use any shell at the job level, and the orb just works.

I think this should be possible, the orb just needs to specify to run it's commands using bash.exe ?

Additional Information:

Workaround for me is to set the job level shell to bash, then override to powershell for every job. This works in a Windows runner.

Related: https://github.com/CircleCI-Public/slack-orb/pull/380#issuecomment-1778648385

martin-displayr avatar Oct 26 '23 00:10 martin-displayr

Hey, I just wanted to share here that we are nearly about to release the beta version of a re-write of this orb in Go. I'll post here again with information for upgrading to the beta test. eval is no longer supported in the go version, so this should be resolved. The only hard requirement we believe will be needed is either CURL or WGET

KyleTryon avatar Dec 04 '23 15:12 KyleTryon

Seems like the go orb was made, just not sure how maintained it is? https://github.com/CircleCI-Public/slack-orb-go Which should we be using? Seems like the go orb doesn't have thread support yet.

alxDisplayr avatar Aug 07 '24 06:08 alxDisplayr