Skip to content

Commit

Permalink
Merge pull request #78 from cksource/t/74
Browse files Browse the repository at this point in the history
Fix: Whitespaces in a CWD should not break the `bootstrap` command. Closes #74.
  • Loading branch information
Reinmar committed May 4, 2018
2 parents 7c2a2ee + be9485d commit 3a5eaac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/commands/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ module.exports = {
promise = Promise.resolve();
} else {
const command = [
`git clone --progress ${ data.repository.url } ${ destinationPath }`,
`cd ${ destinationPath }`,
`git clone --progress "${ data.repository.url }" "${ destinationPath }"`,
`cd "${ destinationPath }"`,
`git checkout --quiet ${ data.repository.branch }`
].join( ' && ' );

Expand Down
4 changes: 2 additions & 2 deletions tests/commands/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ describe( 'commands/bootstrap', () => {

// Clone the repository.
expect( cloneCommand[ 0 ] )
.to.equal( 'git clone --progress git@github.com/organization/test-package.git packages/test-package' );
.to.equal( 'git clone --progress "git@github.com/organization/test-package.git" "packages/test-package"' );
// Change the directory to cloned package.
expect( cloneCommand[ 1 ] ).to.equal( 'cd packages/test-package' );
expect( cloneCommand[ 1 ] ).to.equal( 'cd "packages/test-package"' );
// And check out to proper branch.
expect( cloneCommand[ 2 ] ).to.equal( 'git checkout --quiet master' );

Expand Down

0 comments on commit 3a5eaac

Please sign in to comment.