From 834dc4210e905513b750beaa7224e2124594a59b Mon Sep 17 00:00:00 2001 From: Christian Kuster Date: Fri, 9 Dec 2016 09:25:20 +0100 Subject: [PATCH] Test for GitHub issue #1: removed absolute path for iwlist --- lib/iwlist.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/iwlist.js b/lib/iwlist.js index 627a95c..801e17b 100644 --- a/lib/iwlist.js +++ b/lib/iwlist.js @@ -4,7 +4,9 @@ */ const _ = require('lodash'); -const tool = '/usr/bin/iwlist'; +// usually located in /usr/bin/ but as it could be at another location, allow all found in PATH (but we're in trouble +// when the default location, /usr/bin/ is not in the PATH!). GitHub issue #1 +const tool = 'iwlist'; const cmdLine = tool + ' scan'; const macRegex = /([0-9a-zA-Z]{1}[0-9a-zA-Z]{1}[:]{1}){5}[0-9a-zA-Z]{1}[0-9a-zA-Z]{1}/;