mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
util: remove node_modules/ in errMsg
This commit is contained in:
1 parent
561c4d4175
commit
cc6e623413
4 files changed
+11
-5
No files matched your search
@@ -270,6 +270,8 @@ export function errorMessage(err: Error | string) {
|
||||
.replace(/\/.+\/@hydrooj\//g, '\\')
|
||||
.replace(/[A-Z]:\\.+\\hydrooj\\/g, 'hydrooj\\')
|
||||
.replace(/\/.+\/hydrooj\//g, 'hydrooj/')
|
||||
.replace(/[A-Z]:\\.+\\node_modules\\/g, '')
|
||||
.replace(/\/.+\/node_modules\//g, '')
|
||||
.replace(/\\/g, '/');
|
||||
if (typeof err === 'string') return parsed;
|
||||
err.stack = parsed;
|
||||
|
||||
Reference in new issue
Block a user