Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: strips trailing slash from path (#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbachko authored and daviddias committed Sep 4, 2017
1 parent 1e5dd2c commit bfc58d6
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 88 deletions.
3 changes: 3 additions & 0 deletions src/cli/commands/files/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ function checkPath (inPath, recursive) {
throw new Error('Error: Argument \'path\' is required')
}

// Strips trailing slash from path.
inPath = inPath.replace(/\/$/, '')

if (inPath === '.') {
inPath = process.cwd()
}
Expand Down
Loading

0 comments on commit bfc58d6

Please sign in to comment.