Directory with space in name not working for 'working_directory'

You may come across the need to use a space in your working directory

When setting the working_directory in a build, the CIRCLE_WORKING_DIRECTORY environment variable is set to that value, so if the directory has a space like "01 Test" it would be set to:

CIRCLE_WORKING_DIRECTORY=01 Test

When when the directory is created, mkdir 01 Test is called -- which would result in two directories being created (01 and Test). With this in mind, you can protect the space with single quotes like this:

working_directory: "01' 'Test"

This will result in the variable being set to CIRCLE_WORKING_DIRECTORY=01' 'Test which will properly account for the space and result in one directory being created.

Was this article helpful?
0 out of 1 found this helpful

Comments

0 comments

Article is closed for comments.