mirror of
https://github.com/amark/gun.git
synced 2025-11-24 06:25:58 +00:00
trim
This commit is contained in:
parent
e15416ff2d
commit
ca0e7e35ae
@ -233,8 +233,8 @@ function start(root){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
cmd.update = function(msg, peer){ var run, log, pass;
|
cmd.update = function(msg, peer){ var run, log, pass;
|
||||||
try{ pass = ''+require('fs').readFileSync(require('os').homedir()+'/pass') }catch(e){}
|
try{ pass = (''+require('fs').readFileSync(require('os').homedir()+'/pass')).trim() }catch(e){}
|
||||||
if(!pass || msg.pass != pass){ return }
|
if(!pass || (msg.pass||'').trim() != pass){ return }
|
||||||
if(!(run = require('child_process').exec)){ return }
|
if(!(run = require('child_process').exec)){ return }
|
||||||
var path = require('path').resolve(__dirname, '../examples');
|
var path = require('path').resolve(__dirname, '../examples');
|
||||||
run("bash "+path+"/install.sh", {env: {VERSION: msg.version||''}}, function(e, out, err){
|
run("bash "+path+"/install.sh", {env: {VERSION: msg.version||''}}, function(e, out, err){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user