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",