How to build on logical drive created by SUBST

saper's Avatar


10 Jan, 2016 02:27 AM

To follow a good practice in maintaining PDB files I have asked Appveyor to compile using a drive created by the SUBST.EXE command. For more details refer to the excellent article

After lots of fighting with the YAML syntax I have a working configuration.

My application will live in c:\projects\node_modules\node-sass but c:\project will be substed as "S:" drive,
so I will build in the "S:\node_modules\node_sass" directory. This is the path I want to have in my PDB file.

Here's how I achieved it (from my appveyor.yml file):

  clone_folder: c:\projects\node_modules\node-sass

    - cmd: >-
        subst s: c:\projects

    - ps: set-location -path s:\node_modules\node-sass

You cannot put the S: drive in the clone_folder directive because the directory will be created before your init phase starts.

For debugging, this Powershell command will print all logical drive letters available:
- ps: gwmi win32_logicaldisk | % { $_.DeviceID }

Before subst it prints only


After subst it prints

  1. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:03 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac