Skip to content

Commit

Permalink
fixes NodeJS detection issue on Mac and Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-portmen committed Oct 5, 2017
1 parent d8da732 commit 79c8045
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion host.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var files = [];
var sprocess = [];

var config = {
version: '0.5.9'
version: '0.6.0'
};
// closing node when parent process is killed
process.stdin.resume();
Expand Down
9 changes: 6 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
cd "$(dirname "$0")/app"

which node 2>/dev/null
echo NodeJS status = $?
if [ $? -eq 0 ]; then
isNode=$?
echo NodeJS status = $isNode

if [ $isNode -eq 0 ]; then
node -e "process.exit(Number(process.version.substr(1).split('.')[0]) > 5 ? 0 : 1)"
isValidNode=$?
fi
if [ $? -eq 0 ]; then
if [ $isValidNode -eq 0 ]; then
echo "Installer is using your system NodeJS."
node install.js `which node` $1
else
Expand Down

0 comments on commit 79c8045

Please sign in to comment.