Merge pull request #2344 from lbryio/fix-lbrynet
Fix lbrynet not starting
This commit is contained in:
commit
3cb84c6df2
5 changed files with 16 additions and 5 deletions
|
@ -45,7 +45,7 @@
|
||||||
"electron-log": "^2.2.12",
|
"electron-log": "^2.2.12",
|
||||||
"electron-updater": "^4.0.6",
|
"electron-updater": "^4.0.6",
|
||||||
"express": "^4.16.4",
|
"express": "^4.16.4",
|
||||||
"keytar": "4.4.1"
|
"keytar": "^4.4.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.0.0",
|
"@babel/core": "^7.0.0",
|
||||||
|
@ -100,7 +100,6 @@
|
||||||
"hast-util-sanitize": "^1.1.2",
|
"hast-util-sanitize": "^1.1.2",
|
||||||
"husky": "^0.14.3",
|
"husky": "^0.14.3",
|
||||||
"json-loader": "^0.5.4",
|
"json-loader": "^0.5.4",
|
||||||
"keytar": "4.4.1",
|
|
||||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||||
"lbry-redux": "lbryio/lbry-redux#2a7e05940f892f104428eeb37bd1f178da811a09",
|
"lbry-redux": "lbryio/lbry-redux#2a7e05940f892f104428eeb37bd1f178da811a09",
|
||||||
"lbryinc": "lbryio/lbryinc#351d0a08806b0f770b50066b61a806171f6424d4",
|
"lbryinc": "lbryio/lbryinc#351d0a08806b0f770b50066b61a806171f6424d4",
|
||||||
|
|
|
@ -4,7 +4,9 @@ import { spawn, execSync } from 'child_process';
|
||||||
import { Lbry } from 'lbry-redux';
|
import { Lbry } from 'lbry-redux';
|
||||||
|
|
||||||
export default class Daemon {
|
export default class Daemon {
|
||||||
static path = process.env.LBRY_DAEMON || path.join(__static, 'lbrynet');
|
static path = process.env.LBRY_DAEMON || (
|
||||||
|
process.env.NODE_ENV === 'production' ? path.join(process.resourcesPath, 'static', 'lbrynet') : path.join(__static, 'lbrynet')
|
||||||
|
);
|
||||||
subprocess;
|
subprocess;
|
||||||
handlers;
|
handlers;
|
||||||
|
|
||||||
|
|
|
@ -70,4 +70,11 @@ mainInstance.waitUntilValid(() => {
|
||||||
child.stdout.on('data', (data) => {
|
child.stdout.on('data', (data) => {
|
||||||
console.log(data.toString());
|
console.log(data.toString());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
process.on('SIGINT', function() {
|
||||||
|
console.log('Killing threads...');
|
||||||
|
|
||||||
|
child.kill('SIGINT');
|
||||||
|
process.exit();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -60,7 +60,10 @@ if (process.env.NODE_ENV === 'production') {
|
||||||
const nodeExternals = require('webpack-node-externals');
|
const nodeExternals = require('webpack-node-externals');
|
||||||
// Apply dev overrides
|
// Apply dev overrides
|
||||||
mainConfig = merge(mainConfig, {
|
mainConfig = merge(mainConfig, {
|
||||||
externals: [nodeExternals()],
|
externals: {
|
||||||
|
keytar: 'require("keytar")',
|
||||||
|
electron: 'require("electron")',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5982,7 +5982,7 @@ kebab-case@^1.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/kebab-case/-/kebab-case-1.0.0.tgz#3f9e4990adcad0c686c0e701f7645868f75f91eb"
|
resolved "https://registry.yarnpkg.com/kebab-case/-/kebab-case-1.0.0.tgz#3f9e4990adcad0c686c0e701f7645868f75f91eb"
|
||||||
integrity sha1-P55JkK3K0MaGwOcB92RYaPdfkes=
|
integrity sha1-P55JkK3K0MaGwOcB92RYaPdfkes=
|
||||||
|
|
||||||
keytar@4.4.1:
|
keytar@^4.4.1:
|
||||||
version "4.4.1"
|
version "4.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/keytar/-/keytar-4.4.1.tgz#156af8a9b016bf118ee9948b02418c81d760a5ba"
|
resolved "https://registry.yarnpkg.com/keytar/-/keytar-4.4.1.tgz#156af8a9b016bf118ee9948b02418c81d760a5ba"
|
||||||
integrity sha512-6xEe7ybXSR5EZC+z0GI2yqLYZjV1tyPQY2xSZ8rGsBxrrLEh8VR/Lfqv59uGX+I+W+OZxH0jCXN1dU1++ify4g==
|
integrity sha512-6xEe7ybXSR5EZC+z0GI2yqLYZjV1tyPQY2xSZ8rGsBxrrLEh8VR/Lfqv59uGX+I+W+OZxH0jCXN1dU1++ify4g==
|
||||||
|
|
Loading…
Reference in a new issue