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

Commit c80b780

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

File tree

2 files changed

+99
-88
lines changed

2 files changed

+99
-88
lines changed

src/cli/commands/files/add.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ function checkPath (inPath, recursive) {
2525
if (!inPath) {
2626
throw new Error('Error: Argument \'path\' is required')
2727
}
28+
29+
// Strips trailing slash from path.
30+
inPath = inPath.replace(/\/$/, '')
2831

2932
if (inPath === '.') {
3033
inPath = process.cwd()

0 commit comments

Comments
 (0)