mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
修复进程锁可能不会被正常移除的问题
This commit is contained in:
1 parent
cb611d8f08
commit
55754b2e20
4 files changed
+6
-6
No files matched your search
@@ -20,6 +20,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: hydro
|
name: hydro
|
||||||
path: .
|
path: .
|
||||||
- run: npm publish
|
- uses: JS-DevTools/npm-publish@v1
|
||||||
env:
|
with:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
token: ${{ secrets.NPM_TOKEN }}
|
||||||
@@ -23,6 +23,7 @@ export async function load(call: Entry) {
|
|||||||
};
|
};
|
||||||
await fs.writeFile(lockfile, JSON.stringify(context));
|
await fs.writeFile(lockfile, JSON.stringify(context));
|
||||||
global.onDestory.push(() => {
|
global.onDestory.push(() => {
|
||||||
|
fs.removeSync(lockfile);
|
||||||
fs.emptyDirSync(tmpdir);
|
fs.emptyDirSync(tmpdir);
|
||||||
});
|
});
|
||||||
require('../lib/i18n');
|
require('../lib/i18n');
|
||||||
|
|||||||
+1
-2
@@ -64,8 +64,7 @@ interface EntryConfig {
|
|||||||
async function entry(config: EntryConfig) {
|
async function entry(config: EntryConfig) {
|
||||||
if (config.entry) {
|
if (config.entry) {
|
||||||
if (config.newProcess) {
|
if (config.newProcess) {
|
||||||
const sargv = [`--entry=${config.entry}`];
|
const p = await fork([`--entry=${config.entry}`]);
|
||||||
const p = await fork(sargv);
|
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
p.on('exit', (code, signal) => {
|
p.on('exit', (code, signal) => {
|
||||||
if (code === 0) resolve();
|
if (code === 0) resolve();
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.10.1",
|
"version": "2.10.2",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
Reference in new issue
Block a user