Unexpected behavior with environment variable expansion in Powershell plugin

7 views
Skip to first unread message

t3knoid

unread,
Oct 17, 2018, 7:02:28 AM10/17/18
to Jenkins Users
I have a simple powershell script that simply runs the following:

Write-Output "myCommand myCommand -param $env:MyParameter"
myCommand -param $env:MyParameter

The first one writes out the command that is being executed below. The $env:MyParameter is expanded correctly with its value. However, the actual command that is executed on the next line, does not. The command myCommand gets the actual string that I pass, "$env:MyParameter."




Reply all
Reply to author
Forward
0 new messages