Skip to content

Commit

Permalink
trim
Browse files Browse the repository at this point in the history
  • Loading branch information
amark committed Apr 26, 2023
1 parent e15416f commit ca0e7e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/axe.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ function start(root){
});
}
cmd.update = function(msg, peer){ var run, log, pass;
try{ pass = ''+require('fs').readFileSync(require('os').homedir()+'/pass') }catch(e){}
if(!pass || msg.pass != pass){ return }
try{ pass = (''+require('fs').readFileSync(require('os').homedir()+'/pass')).trim() }catch(e){}
if(!pass || (msg.pass||'').trim() != pass){ return }
if(!(run = require('child_process').exec)){ return }
var path = require('path').resolve(__dirname, '../examples');
run("bash "+path+"/install.sh", {env: {VERSION: msg.version||''}}, function(e, out, err){
Expand Down

0 comments on commit ca0e7e3

Please sign in to comment.