@atom/notify
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -19,3 +19,3 @@ const { spawn } = require("child_process"); | ||
this.childProcess = spawn( | ||
`${__dirname}/../notify-subprocess-${process.platform}`, | ||
`${__dirname}/../bin/notify-subprocess-${process.platform}`, | ||
args, | ||
@@ -22,0 +22,0 @@ { |
{ | ||
"name": "@atom/notify", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Cross-platform file system notifications", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -26,7 +26,4 @@ const { execSync } = require("child_process"); | ||
let dstPath = path.join( | ||
__dirname, | ||
"..", | ||
`notify-subprocess-${process.platform}` | ||
); | ||
let binDirPath = path.join(__dirname, "..", "bin"); | ||
let dstPath = path.join(binDirPath, `notify-subprocess-${process.platform}`); | ||
if (process.platform === "win32") dstPath += ".exe"; | ||
@@ -37,2 +34,3 @@ | ||
); | ||
if (!fs.existsSync(binDirPath)) fs.mkdirSync(binDirPath) | ||
fs.copyFileSync(srcPath, dstPath); |
@@ -11,3 +11,4 @@ const fs = require("fs"); | ||
const binaryPath = path.join(__dirname, "..", artifactName); | ||
const binDirPath = path.join(__dirname, "..", "bin"); | ||
const binPath = path.join(binDirPath, artifactName); | ||
@@ -18,2 +19,3 @@ console.log( | ||
); | ||
if (!fs.existsSync(binDirPath)) fs.mkdirSync(binDirPath); | ||
downloadBinary(artifactUrl); | ||
@@ -30,5 +32,5 @@ | ||
case 200: { | ||
fs.writeFileSync(binaryPath, ""); | ||
fs.chmodSync(binaryPath, 0o755); | ||
response.pipe(fs.createWriteStream(binaryPath)); | ||
fs.writeFileSync(binPath, ""); | ||
fs.chmodSync(binPath, 0o755); | ||
response.pipe(fs.createWriteStream(binPath)); | ||
return; | ||
@@ -35,0 +37,0 @@ } |
9528