#1609·BackstopJS

Remote fails if path contains space

Author: BenceSzalaiCreated Sep 13, 2025Updated Sep 14, 2025

Title says it pretty much all.

I'm wondering if there is a reason for not wrapping the paths in "s when spawning the node process for the server?

It is easy to say not do put space in the path, but once a project is already initialised with many stuff already pointing at a folder it can be quite cumbersome to change folder names.

A fix could be as simple as changing https://github.com/garris/BackstopJS/blob/master/core/command/remote.js#L14 from:

javascript
const commandStr = `node ${ssws} ${projectPath} ${MIDDLEWARE_PATH} --config=${config.backstopConfigFileName}`;

to

javascript
const commandStr = `node "${ssws}" "${projectPath}" "${MIDDLEWARE_PATH}" --config="${config.backstopConfigFileName}"`;

Let me know if a PR is welcome?