fix(paths): accept Unicode working directories

This commit is contained in:
codeman-local committed 2026-07-21 00:04:40 +08:00
1 parent 6c8d4ca72f
commit 66ad681666
3 files changed
+26 -2

No files matched your search

+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.