garris / garris/BackstopJS

Remote fails if path contains space

Open
#1,609 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
621
PR merge metrics
No merged PRs in 30d

Description

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:
```js
const commandStr = `node ${ssws} ${projectPath} ${MIDDLEWARE_PATH} --config=${config.backstopConfigFileName}`;
```

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

Let me know if a PR is welcome?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.