[JIRA] (JENKINS-60140) Cannot run program "powershell" when powershell 6.0 core installed

0 views
Skip to first unread message

jnz@topdanmark.dk (JIRA)

unread,
Nov 12, 2019, 3:24:02 AM11/12/19
to jenkinsc...@googlegroups.com
Jon Brohauge created an issue
 
Jenkins / Bug JENKINS-60140
Cannot run program "powershell" when powershell 6.0 core installed
Issue Type: Bug Bug
Assignee: Unassigned
Components: durable-task-plugin, powershell-plugin
Created: 2019-11-12 08:23
Environment: Jenkins: 2.201
Durable Task Plugin: 1.31
Powershell Plugin: 1.3
Priority: Minor Minor
Reporter: Jon Brohauge

Having installed Powershell 6.0 Core on our linux agents, there is no longer a program called "powershell". It is called "pwsh", and as such anything calling "powershell" will fail.

Example:

Fails:

sh('powershell -version')

Works:

sh('pwsh -version')

A possible (I haven't tried) workaround is to make a symbolic link between pwsh -> powershell.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

jnz@topdanmark.dk (JIRA)

unread,
Nov 12, 2019, 5:08:03 AM11/12/19
to jenkinsc...@googlegroups.com
Jon Brohauge updated an issue
Change By: Jon Brohauge
Having installed Powershell 6.0 Core on our linux agents, there is no longer a program called "powershell". It is called "pwsh", and as such anything calling "powershell" will fail.

Example:

Fails:
{code:java}
sh('powershell -version'){code}
Works:
{code:java}
sh('pwsh -version'){code}
A
possible (I haven't tried) workaround is to make a symbolic link between pwsh -> powershell.
{code:java}
ln -s /usr/bin/pwsh /usr/bin/powershell{code}

cchiou@cloudbees.com (JIRA)

unread,
Nov 14, 2019, 2:18:02 PM11/14/19
to jenkinsc...@googlegroups.com
Carroll Chiou closed an issue as Not A Defect
 

Closing as this issue was resolved in workflow-durable-task-step 2.35

Change By: Carroll Chiou
Status: Open Closed
Resolution: Not A Defect
Reply all
Reply to author
Forward
0 new messages