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

Commit 0460820

Browse files
committed
Strips trailing slash from path
1 parent 1e5dd2c commit 0460820

File tree

2 files changed

+99
-88
lines changed

2 files changed

+99
-88
lines changed

src/cli/commands/files/add.js

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ function checkPath (inPath, recursive) {
2626
throw new Error('Error: Argument \'path\' is required')
2727
}
2828

29+
// Strips trailing slash from path.
30+
inPath = inPath.replace(/\/$/, '')
31+
2932
if (inPath === '.') {
3033
inPath = process.cwd()
3134
}

0 commit comments

Comments
 (0)