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

Commit 41266e5

Browse files
dbachkodryajov
authored andcommitted
fix: strips trailing slash from path (#985)
1 parent d39e255 commit 41266e5

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
@@ -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)