R-Nozawa commited on
Commit
6b83624
·
verified ·
1 Parent(s): 8dabc58

Update install_and_run.js

Browse files
Files changed (1) hide show
  1. install_and_run.js +2 -2
install_and_run.js CHANGED
@@ -4,7 +4,7 @@ const path = require('path');
4
 
5
  const zipUrl = process.env.ZIP_URL;
6
  const downloadPath = '/tmp/app.zip';
7
- const extractPath = '/app'; // Kita akan mengekstrak langsung ke /app setelah diunduh ke /tmp
8
 
9
  async function runCommand(command) {
10
  return new Promise((resolve, reject) => {
@@ -33,7 +33,7 @@ async function main() {
33
  await runCommand(`wget "${zipUrl}" -O ${downloadPath}`);
34
 
35
  console.log(`Extracting ZIP file to: ${extractPath}`);
36
- await runCommand(`unzip -o ${downloadPath} -d ${extractPath}`); // -o untuk overwrite jika ada file yang sama
37
 
38
  console.log("Removing downloaded ZIP file...");
39
  await fs.unlink(downloadPath);
 
4
 
5
  const zipUrl = process.env.ZIP_URL;
6
  const downloadPath = '/tmp/app.zip';
7
+ const extractPath = '/app';
8
 
9
  async function runCommand(command) {
10
  return new Promise((resolve, reject) => {
 
33
  await runCommand(`wget "${zipUrl}" -O ${downloadPath}`);
34
 
35
  console.log(`Extracting ZIP file to: ${extractPath}`);
36
+ await runCommand(`unzip -o ${downloadPath} -d ${extractPath}`);
37
 
38
  console.log("Removing downloaded ZIP file...");
39
  await fs.unlink(downloadPath);