From 00c973e728b1939484f886fa30b3399420815aa1 Mon Sep 17 00:00:00 2001 From: John Shaver Date: Wed, 13 Jun 2018 14:00:08 -0700 Subject: [PATCH] Moved default sorting-hat value into remote.js --- bin/telebitd.js | 2 +- lib/remote.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/telebitd.js b/bin/telebitd.js index d2ba805..9af49be 100755 --- a/bin/telebitd.js +++ b/bin/telebitd.js @@ -517,7 +517,7 @@ function connectTunnel() { state.otp = getOtp(); state.greenlockConf = state.config.greenlock || {}; - state.sortingHat = state.config.sortingHat || path.resolve(__dirname, '..', 'lib/sorting-hat.js'); + state.sortingHat = state.config.sortingHat; // TODO sortingHat.print(); ? diff --git a/lib/remote.js b/lib/remote.js index 3af3709..c2f8c07 100644 --- a/lib/remote.js +++ b/lib/remote.js @@ -23,6 +23,9 @@ function _connect(state) { // they can get a promise that will provide feedback about invalid tokens. var tokens = []; var auth; + if(!state.sortingHat) { + state.sortingHat = "./sorting-hat.js"; + } if (state.token) { tokens.push(state.token); }