Skip to content

Commit a4d00ec

Browse files
committed
chore: improve withTitle method
1 parent 84df16f commit a4d00ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function projectPath() {
3535
}
3636

3737
export function withTilde(path) {
38-
return path.replace(homedir(), '~').replace('~/', '~')
38+
return path.replace(homedir(), '~/').replace(/\/{2,}/, '/')
3939
}
4040

4141
export async function getPackageJson(cwd) {

0 commit comments

Comments
 (0)