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


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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

Recent Discussions

18 Aug, 2018 12:13 AM
17 Aug, 2018 09:45 PM
17 Aug, 2018 06:02 PM
17 Aug, 2018 04:26 PM
17 Aug, 2018 04:04 PM