Skip to content

Commit 62d7a0e

Browse files
committed
Make trailing slash optional
1 parent 36ba8d3 commit 62d7a0e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils/meow-with-subcommands.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,10 @@ function getAsciiHeader(command: string) {
219219
process
220220
.cwd()
221221
.replace(
222-
new RegExp(`^${escapeRegExp(constants.homePath + path.sep)}`, 'i'),
222+
new RegExp(
223+
`^${escapeRegExp(constants.homePath)}(?:${path.sep}|$)`,
224+
'i'
225+
),
223226
'~/'
224227
)
225228
)

0 commit comments

Comments
 (0)