diff options
author | 2017-10-24 10:31:18 +0200 | |
---|---|---|
committer | 2017-10-24 10:31:18 +0200 | |
commit | 01318efeb89a51d9d84b99943f7e4f0c83a41917 (patch) | |
tree | 5609a1bd67fbd1530b6b6851cc97ed144d96eb33 /src/api | |
parent | Merge pull request #80 from apo-mak/develop (diff) | |
download | ferdium-app-01318efeb89a51d9d84b99943f7e4f0c83a41917.tar.gz ferdium-app-01318efeb89a51d9d84b99943f7e4f0c83a41917.tar.zst ferdium-app-01318efeb89a51d9d84b99943f7e4f0c83a41917.zip |
replace tar.gz dependency (deprecated) with tar
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/server/ServerApi.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/api/server/ServerApi.js b/src/api/server/ServerApi.js index 86f4c99e7..8581beef7 100644 --- a/src/api/server/ServerApi.js +++ b/src/api/server/ServerApi.js | |||
@@ -1,6 +1,6 @@ | |||
1 | import os from 'os'; | 1 | import os from 'os'; |
2 | import path from 'path'; | 2 | import path from 'path'; |
3 | import targz from 'tar.gz'; | 3 | import tar from 'tar'; |
4 | import fs from 'fs-extra'; | 4 | import fs from 'fs-extra'; |
5 | import { remote } from 'electron'; | 5 | import { remote } from 'electron'; |
6 | 6 | ||
@@ -293,7 +293,11 @@ export default class ServerApi { | |||
293 | const buffer = await res.buffer(); | 293 | const buffer = await res.buffer(); |
294 | fs.writeFileSync(archivePath, buffer); | 294 | fs.writeFileSync(archivePath, buffer); |
295 | 295 | ||
296 | await targz().extract(archivePath, recipeTempDirectory); | 296 | tar.x({ |
297 | file: archivePath, | ||
298 | cwd: recipeTempDirectory, | ||
299 | sync: true, | ||
300 | }); | ||
297 | 301 | ||
298 | const { id } = fs.readJsonSync(path.join(recipeTempDirectory, 'package.json')); | 302 | const { id } = fs.readJsonSync(path.join(recipeTempDirectory, 'package.json')); |
299 | const recipeDirectory = path.join(recipesDirectory, id); | 303 | const recipeDirectory = path.join(recipesDirectory, id); |