Certain commands split paths that contain spaces leading to SVN erroring out.
Sometimes I could hack around this issue by wrapping the single-path-parameters (usually anything passed just a WC path) in an array, but there are still some places where other utilities (eg npm-svn) will use a single file where multiple may also allowed. (As of course many commands accept both either a string or array of file paths.)
I was able to create a simple test case that illustrated this, albeit in a case that will always end in an error:
- Create a new directory somewhere with spaces in its name, eg
node svn test
- In my particular case, it was created in
/Users/joedski/node svn test
- Initialize with
npm init .
- Install
svn-interface as a dependency
- Create js file containing the following code
- Execute file with node and observe output
JS File:
var svn = require( 'svn-interface' );
// no array wrapping.
svn.info( process.cwd(), {}, function( error, result ) {
console.log( result );
});
// with array wrapping.
svn.info( [ process.cwd() ], {}, function( error, result ) {
console.log( result );
});
Expected Output
svn: E155007: '/Users/joedski/node svn test' is not a working copy
svn: E155007: '/Users/joedski/node svn test' is not a working copy
Actual Output
svn: E155007: '/Users/joedski/node' is not a working copy
svn: E155007: '/Users/joedski/node svn test' is not a working copy
Certain commands split paths that contain spaces leading to SVN erroring out.
Sometimes I could hack around this issue by wrapping the single-path-parameters (usually anything passed just a WC path) in an array, but there are still some places where other utilities (eg
npm-svn) will use a single file where multiple may also allowed. (As of course many commands accept both either a string or array of file paths.)I was able to create a simple test case that illustrated this, albeit in a case that will always end in an error:
node svn test/Users/joedski/node svn testnpm init .svn-interfaceas a dependencyJS File:
Expected Output
Actual Output