mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +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;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/utils",
|
||||
"version": "1.0.16",
|
||||
"version": "1.0.17",
|
||||
"description": "hydrooj utils",
|
||||
"main": "package.json",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
Reference in new issue
Block a user