Skip to content
This repository has been archived by the owner on Apr 18, 2022. It is now read-only.

Commit

Permalink
using tar instead of decompress die to kevva/decompress#52 and kevva/…
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1seL committed Mar 13, 2021
1 parent 785f80b commit 58a00e0
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 734 deletions.
7 changes: 4 additions & 3 deletions lib/serverManagement/management.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { spawn } = require('child_process');
const path = require('path');
const fs = require('fs');
const decompress = require('decompress');
const tar = require('tar');
const moduleConfig = require('./config').getConfig();
const downloader = require('./downloader');
const nginx = require('../nginx/nginx');
Expand All @@ -21,8 +21,9 @@ async function install() {
}

if (!fs.existsSync(global.appsPath)) {
console.log(`Decompressing ${releaseFilePath}`);
await decompress(releaseFilePath, global.appsPath);
fs.mkdirSync(global.appsPath, { recursive: true });
console.log(`Decompressing ${releaseFilePath}...`);
await tar.x({ file: releaseFilePath, C: global.appsPath });
}
} catch (err) {
console.log(err.message);
Expand Down
Loading

0 comments on commit 58a00e0

Please sign in to comment.