fix(paths): accept Unicode working directories

This commit is contained in:
codeman-local
2026-07-21 00:04:40 +08:00
parent 6c8d4ca72f
commit 66ad681666
3 changed files with 26 additions and 2 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ export function stripAnsi(text: string): string {
*/
export const SPINNER_PATTERN = /[⠋⠙⠹⠸⠼⠴⠦⠧]/;
export const SAFE_PATH_PATTERN = /^[a-zA-Z0-9_/\-. ~]+$/;
export const SAFE_PATH_PATTERN = /^[\p{L}\p{N}_/\-. ~]+$/u;
/**
* Execute a global regex pattern against data, calling the callback for each match.