From 55754b2e203cc4a1ef0c2b33f544fb9317267d0c Mon Sep 17 00:00:00 2001 From: undefined Date: Fri, 24 Jul 2020 18:27:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=9B=E7=A8=8B=E9=94=81?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E4=B8=8D=E4=BC=9A=E8=A2=AB=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 6 +++--- hydro/entry/master.ts | 1 + hydro/loader.ts | 3 +-- package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3319bf5bd..bf6fedba5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,6 @@ jobs: with: name: hydro path: . - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + - uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/hydro/entry/master.ts b/hydro/entry/master.ts index eada6452d..d24b9cfaf 100644 --- a/hydro/entry/master.ts +++ b/hydro/entry/master.ts @@ -23,6 +23,7 @@ export async function load(call: Entry) { }; await fs.writeFile(lockfile, JSON.stringify(context)); global.onDestory.push(() => { + fs.removeSync(lockfile); fs.emptyDirSync(tmpdir); }); require('../lib/i18n'); diff --git a/hydro/loader.ts b/hydro/loader.ts index 425985c8f..728eb230b 100644 --- a/hydro/loader.ts +++ b/hydro/loader.ts @@ -64,8 +64,7 @@ interface EntryConfig { async function entry(config: EntryConfig) { if (config.entry) { if (config.newProcess) { - const sargv = [`--entry=${config.entry}`]; - const p = await fork(sargv); + const p = await fork([`--entry=${config.entry}`]); await new Promise((resolve, reject) => { p.on('exit', (code, signal) => { if (code === 0) resolve(); diff --git a/package.json b/package.json index 710de8251..6cd77763d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hydrooj", - "version": "2.10.1", + "version": "2.10.2", "main": "dist/loader.js", "bin": "bin/hydrooj.js", "repository": "https://github.com/hydro-dev/Hydro.git",