mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
utils: errorMessage: filter unuseful lines [skip-cache]
This commit is contained in:
1 parent
1c128f85c5
commit
6cea9eb51c
2 files changed
+4
-7
No files matched your search
@@ -24,12 +24,6 @@ jobs:
|
|||||||
- name: Get yarn cache directory path
|
- name: Get yarn cache directory path
|
||||||
id: yarn-cache-dir-path
|
id: yarn-cache-dir-path
|
||||||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
|
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
|
||||||
- name: skip-cache
|
|
||||||
id: skip-cache
|
|
||||||
uses: saulmaldonado/skip-workflow@v1
|
|
||||||
with:
|
|
||||||
phrase: 'skip-cache'
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
@@ -42,7 +36,7 @@ jobs:
|
|||||||
cache-${{ github.ref }}-
|
cache-${{ github.ref }}-
|
||||||
cache-
|
cache-
|
||||||
- name: Clear Cache
|
- name: Clear Cache
|
||||||
if: ${{ steps.skip-cache.outputs.skip }}
|
if: "contains(github.event.head_commit.message, 'skip-cache')"
|
||||||
run: |
|
run: |
|
||||||
rm -rf node_modules yarn.lock **/tsconfig.tsbuildinfo
|
rm -rf node_modules yarn.lock **/tsconfig.tsbuildinfo
|
||||||
- name: Config And Install
|
- name: Config And Install
|
||||||
|
|||||||
@@ -162,6 +162,9 @@ export namespace Time {
|
|||||||
export function errorMessage(err: Error | string) {
|
export function errorMessage(err: Error | string) {
|
||||||
const t = typeof err === 'string' ? err : err.stack;
|
const t = typeof err === 'string' ? err : err.stack;
|
||||||
const parsed = t
|
const parsed = t
|
||||||
|
.split('\n')
|
||||||
|
.filter((i) => !i.includes(' (node:'))
|
||||||
|
.join('\n')
|
||||||
.replace(/[A-Z]:\\.+\\@hydrooj\\/g, '@hydrooj\\')
|
.replace(/[A-Z]:\\.+\\@hydrooj\\/g, '@hydrooj\\')
|
||||||
.replace(/\/.+\/@hydrooj\//g, '\\')
|
.replace(/\/.+\/@hydrooj\//g, '\\')
|
||||||
.replace(/[A-Z]:\\.+\\hydrooj\\/g, 'hydrooj\\')
|
.replace(/[A-Z]:\\.+\\hydrooj\\/g, 'hydrooj\\')
|
||||||
|
|||||||
Reference in new issue
Block a user