Search code examples
rubysasssublimetext3sublimetextcompass

SASS won't build if brackets in path of project folder in Sublime Text


I am getting a problem where Sublime Text will not compile SASS if the project directory has any brackets/parentheses () in its path.

In my case having brackets in the path is unavoidable as we use Dropbox for business, which insists on naming it's root folder Dropbox (Company Name).

Is there either:

a) A workaround such as a virtual folder that can be set up

I've already considered mklink \D "C:\Dropbox" "C:\Users\Marc\Dropbox (My Company Name)" to try making a virtual directory "C:\Dropbox" which points to my actual Dropbox folder, but it ended up working more like a shortcut. So when I clicked the virtual folder, I was then back in the original folder with the brackets etc.

b) A way to alter a setting or config for sass/sublime/ruby so that it works with brackets in the path

Or any other workaround or idea to mitigate the problem?


Solution

  • Try creating a directory junction instead of a symbolic link:

    mklink /J "C:\Dropbox" "C:\Users\Marc\Dropbox (My Company Name)"
    

    This makes Windows (and more importantly, Sublime) think that C:\Dropbox is an actual folder, and will build the path based on it instead of the target of the symlink you created earlier.