Commit f5fd2ea70ee09e4654acc6e8baf1a58e4420e9cd
Respect empty ssb_appname env var
Charles Lehner committed on 3/22/2016, 11:47:20 PMParent: f289d22bc4c2304b27215fcbff1dffcfad6f0e12
Files changed
lib/client.js | changed |
lib/client.js | ||
---|---|---|
@@ -2,9 +2,9 @@ | ||
2 | 2 | var ssbKeys = require('ssb-keys') |
3 | 3 | var proc = require('child_process') |
4 | 4 | |
5 | 5 | module.exports = function createSSBClient(cb) { |
6 | - var appName = process.env.ssb_appname || | |
6 | + var appName = 'ssb_appname' in process.env ? process.env.ssb_appname : | |
7 | 7 | proc.spawnSync('git', ['config', 'ssb.appname'], |
8 | 8 | {encoding: 'utf8'}).stdout.trim() |
9 | 9 | var ssbConfig = require('ssb-config/inject')(appName) |
10 | 10 | var keys = ssbKeys.loadOrCreateSync(path.join(ssbConfig.path, 'secret')) |
Built with git-ssb-web