mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix move file error
This commit is contained in:
1 parent
32f34ba187
commit
6e79703dce
2 files changed
+2
-2
No files matched your search
@@ -118,7 +118,7 @@ if (argv.args[0] === 'restore') {
|
|||||||
exec('mongorestore', [`--uri=${url}`, `--dir=${dir}/dump/${JSON.parse(dbConfig).name}`, '--drop'], { stdio: 'inherit' });
|
exec('mongorestore', [`--uri=${url}`, `--dir=${dir}/dump/${JSON.parse(dbConfig).name}`, '--drop'], { stdio: 'inherit' });
|
||||||
if (fs.existsSync(`${dir}/file`)) {
|
if (fs.existsSync(`${dir}/file`)) {
|
||||||
exec('rm', ['-rf', '/data/file/*'], { stdio: 'inherit' });
|
exec('rm', ['-rf', '/data/file/*'], { stdio: 'inherit' });
|
||||||
exec('mv', [`${dir}/file/*`, '/data/file'], { stdio: 'inherit' });
|
exec('bash', ['-c', `mv ${dir}/file/* /data/file`], { stdio: 'inherit' });
|
||||||
}
|
}
|
||||||
if (fs.existsSync(`${dir}/env`)) {
|
if (fs.existsSync(`${dir}/env`)) {
|
||||||
fs.copySync(`${dir}/env`, `${os.homedir()}/.hydro/env`, { overwrite: true });
|
fs.copySync(`${dir}/env`, `${os.homedir()}/.hydro/env`, { overwrite: true });
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "3.2.4",
|
"version": "3.2.5",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/loader",
|
"main": "src/loader",
|
||||||
"module": "src/loader",
|
"module": "src/loader",
|
||||||
|
|||||||
Reference in new issue
Block a user