rhythmic-activity-46295
04/21/2021, 7:50 PMbillowy-army-68599
04/21/2021, 7:53 PMrhythmic-activity-46295
04/21/2021, 8:00 PMtall-needle-56640
04/21/2021, 10:08 PMbillowy-army-68599
04/21/2021, 10:28 PMrun /home/vsts/.pulumi/bin/pulumi version
update your PATH
environment variable to have /home/vsts/.pulumi/bin
before /usr/local/bin
tall-needle-56640
04/22/2021, 1:17 AM- script: |
PATH=/home/vsts/.pulumi/bin\:$PATH ; export PATH
curl -fsSL <https://get.pulumi.com> | sh
But it still accesses the old version.- pwsh: |
Write-Host "##vso[task.setvariable variable=NEWPATH]/home/vsts/.pulumi/bin\:$env:PATH"
And then in the Pulumi step, passed it in as an env var:
env:
PATH: $(NEWPATH)
UPDATE: Nevermind, still doesn't workbillowy-army-68599
04/22/2021, 2:26 AMecho $PATH
/Users/lbriggs/.rvm/gems/ruby-2.5.2/bin:/Users/lbriggs/.rvm/gems/ruby-2.5.2@global/bin:/Users/lbriggs/.rvm/rubies/ruby-2.5.2/bin:/Users/lbriggs/.asdf/shims:/usr/local/opt/asdf/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/puppetlabs/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/lbriggs/src/go/bin:/Users/lbriggs/.rvm/bin
I want the new version of pulumi to be used first. So I do this:
PATH="${HOME}/.pulumi/bin${PATH:+:${PATH}}"
Which prepends the dir to my $PATH
. Now when I do this:
which pulumi
/Users/lbriggs/.pulumi/bin/pulumi
I get the right versionWrite-Host
needs to be
- pwsh: |
Write-Host "##vso[task.setvariable variable=PATH]/home/vsts/.pulumi/bin\:$env:PATH"
tall-needle-56640
04/22/2021, 4:46 PM- bash: |
PATH="${HOME}/.pulumi/bin${PATH:+:${PATH}}"
- bash: |
which pulumi # outputs: /usr/local/bin/pulumi
echo $PATH # /home/linuxbrew/.linuxbrew/bin:...
billowy-army-68599
04/22/2021, 4:51 PMtall-needle-56640
04/22/2021, 9:02 PM- bash: |
curl -fsSL <https://get.pulumi.com> | sh
newPath="${HOME}/.pulumi/bin${PATH:+:${PATH}}"
echo "##vso[task.setvariable variable=NEWPATH]$newPath"
displayName: Install Pulumi
- task:
env:
PATH: $(NEWPATH)
Since I was building on an Ubuntu image, my path changes in Powershell didn't get reflected when the dotnet CLI task ran (which runs in Bash)."${HOME}/.pulumi/bin${PATH:+:${PATH}}"
instead of
"${HOME}/.pulumi/bin:${PATH}"
?
They seem to do the same thing for me.billowy-army-68599
04/22/2021, 9:11 PMrhythmic-activity-46295
04/25/2021, 9:21 PM