summaryrefslogtreecommitdiff
path: root/cli/js
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js')
-rw-r--r--cli/js/util.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/js/util.ts b/cli/js/util.ts
index e779fb5d7..faf4c99c6 100644
--- a/cli/js/util.ts
+++ b/cli/js/util.ts
@@ -306,7 +306,7 @@ export function normalizeString(
export function commonPath(paths: string[], sep = "/"): string {
const [first = "", ...remaining] = paths;
if (first === "" || remaining.length === 0) {
- return "";
+ return first.substring(0, first.lastIndexOf(sep) + 1);
}
const parts = first.split(sep);