Saturday, 1 April 2017

Determine what shell (cmd, bash, or etc) was used to run node.js script

As the title states, I'd like determine what shell (cmd, bash, or etc) was used to run the node.js script (from within the script).

While detecting the OS with the os module can give some clues, it is not enough is some instances, such as as if I were executing from bash on win32 through a terminal like GitBash or Cygwin.

Is there a property somewhere on the process object that has this information?



via bitstrider

No comments:

Post a Comment