@justestif/go-jobs 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/install.js +7 -2
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -76,8 +76,13 @@ download(url, tmpFile, (err) => {
|
|
|
76
76
|
// Windows: extract only jobs.exe
|
|
77
77
|
execFileSync("unzip", ["-j", tmpFile, exe, "-d", binDir]);
|
|
78
78
|
} else {
|
|
79
|
-
// Unix: extract
|
|
80
|
-
execFileSync("tar", ["-xzf", tmpFile, "-C", binDir
|
|
79
|
+
// Unix: extract all files then clean up
|
|
80
|
+
execFileSync("tar", ["-xzf", tmpFile, "-C", binDir]);
|
|
81
|
+
// Remove jobs-server if it exists
|
|
82
|
+
const serverPath = path.join(binDir, "jobs-server");
|
|
83
|
+
if (fs.existsSync(serverPath)) {
|
|
84
|
+
fs.unlinkSync(serverPath);
|
|
85
|
+
}
|
|
81
86
|
}
|
|
82
87
|
fs.chmodSync(outPath, 0o755);
|
|
83
88
|
fs.unlinkSync(tmpFile);
|