Skip to content

Certain commands split paths that contain spaces #7

@joedski

Description

@joedski

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions