As part of an Azure Pipelines build I need to install some tool and add it to the PATH
for subsequent use (by an Ant task), using a script task (on a Windows host). After (a lot) of research I found what should solve my problem: namely the ##vso[task.prependpath]
logging command. But I cannot make it work on my project. Something like the following does nothing, the PATH
is left unchanged:
steps:
- script: |
ECHO ##vso[task.prependpath]%AGENT_BUILDDIRECTORY%\.tmp\node_modules\.bin
IF NOT EXIST .tmp MKDIR .tmp
IF NOT EXIST .tmp\node_modules\.bin\sfdx (
PUSHD .tmp
npm install sfdx-cli
POPD
)
displayName: Install SFDX CLI
What am I doing wrong?