Azure Pipeline Build Agent using subst

157 Views Asked by At

We are moving from TFS on Prem to hosted Azure Devops. In our build we have a script with the following line:

subst E: <my path>

Sadly the E: is not being mapped to.

We call subst E: /D before hand to make sure the path is no there first.

What could be wrong?

1

There are 1 best solutions below

0
Levi Lu-MSFT On BEST ANSWER

I can successfully associate a path with a drive letter with subst command in hosted agent. See below example:

- powershell: |
   subst Z: D:\a
   Z:
   ls

Output :

enter image description here

If the path you were trying to map to E didnot exist in the hosted agent. The mapping will fail.

Please make sure the path you were trying to map exists.