mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +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' });
|
||||
if (fs.existsSync(`${dir}/file`)) {
|
||||
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`)) {
|
||||
fs.copySync(`${dir}/env`, `${os.homedir()}/.hydro/env`, { overwrite: true });
|
||||
|
||||
Reference in new issue
Block a user