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

Commit

Permalink
Strips trailing slash from path
Browse files Browse the repository at this point in the history
  • Loading branch information
dbachko committed Sep 3, 2017
1 parent 1e5dd2c commit c80b780
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 @@ -25,6 +25,9 @@ function checkPath (inPath, recursive) {
if (!inPath) {
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 c80b780

Please sign in to comment.