From 938961247b7a39694352e002fd2154f673f44413 Mon Sep 17 00:00:00 2001 From: Geolffrey Mena Date: Tue, 26 Jan 2021 01:09:44 -0600 Subject: [PATCH 1/2] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index af61039bb..c68d1d465 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "publish:mac": "npm run package:mac -- --publish always", "publish:linux": "npm run package:linux -- --publish always", "publish:win": "npm run package:win -- --publish always", - "preinstall": "node scripts/preinstall.js", + "preinstall": "bash -c \"npm install electron-log && node scripts/preinstall.js\"", "postinstall": "node scripts/postinstall.js" }, "eslintConfig": { From dbb1c7e489714c3b1652ca719a85e5db8e9d24c0 Mon Sep 17 00:00:00 2001 From: geolffrey Date: Tue, 26 Jan 2021 10:12:04 -0600 Subject: [PATCH 2/2] Pure node preinstall --- scripts/preinstall.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/preinstall.js b/scripts/preinstall.js index 2c2132808..a2e253ebb 100644 --- a/scripts/preinstall.js +++ b/scripts/preinstall.js @@ -1,6 +1,8 @@ -const {execPassthru, getElevateExec} = require('./util'); +const log = require('electron-log') +const {execPassthru, getElevateExec, osType} = require('./util'); const executePreInstall = async () => { + log.info('Installing ipfs in', osType); try { await execPassthru('npm install go-ipfs@0.6.0 --no-save', await getElevateExec()); } catch (err) {