Skip to content

Commit 7ae7537

Browse files
committed
Match tokens to word boundary
1 parent c47ad10 commit 7ae7537

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

simple-git/src/lib/plugins/block-unsafe-operations-plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function isCloneSwitch(char: string, arg: string | unknown) {
1313
}
1414

1515
const token = arg.replace(/\0g/, '').replace(/^(--no)?-{1,2}/, '');
16-
return /^[\dlsqvnobucj]+$/.test(token);
16+
return /^[\dlsqvnobucj]+\b/.test(token);
1717
}
1818

1919
function preventProtocolOverride(arg: string, next: string) {

0 commit comments

Comments
 (0)