You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2016/06/10 14:59:30 UTC

[whimsy] 02/04: if nodejs exists, use it

This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

commit 92087ec2456b5ed4c3174f25b1e172335196e9e7
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Fri Jun 10 09:05:38 2016 -0400

    if nodejs exists, use it
---
 www/board/agenda/spec/react_server.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/spec/react_server.rb b/www/board/agenda/spec/react_server.rb
index d94b0c9..acec0b4 100644
--- a/www/board/agenda/spec/react_server.rb
+++ b/www/board/agenda/spec/react_server.rb
@@ -26,7 +26,8 @@ class ReactServer
     server.close
 
     # spawn a server process
-    @@pid = spawn('node', '-e', 
+    nodejs = (`which nodejs`.empty? ? 'node' : 'nodejs')
+    @@pid = spawn(nodejs, '-e', 
       Ruby2JS.convert(@@server, {ivars: {:@port => @@port}}))
 
     # wait for server to start

-- 
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.