kInterpreterShellScript2#

Fully qualified name: carb::launcher::kInterpreterShellScript2

Defined in carb/launcher/ILauncher.h

constexpr char carb::launcher::kInterpreterShellScript2[] = "/bin/bash"#

Standard command interpreters for Windows and Linux.

These can be used in the launch descriptor’s LaunchDesc::interpreter value to override some default interpreter detection functionality.

Note

These interpreter names are just ‘safe’ interpreters. If a caller has additional knowledge of the functional requirements of a script (ie: requires python 3.6+, requires a specific install of python, requires additional options for the interpreter, etc), it is the caller’s responsibility to ensure an appropriate interpreter path and command is provided in LaunchDesc::interpreter. If no interpreter path is given in the launch descriptor, one of these interpreters will be chosen based on the extension of the script file.

Note

If you need to use cmd /C, you must use kInterpreterShellScript so that ILauncher can properly quote your arguments, since cmd /C does not interpret a command argument in the way that almost every other interpreter does.

Warning

On Windows, specifying the command line interprerter as simply cmd.exe as is listed here can lead to a potential security risk (MS14-019). This is because a malicious actor could potentially intercept the cmd.exe executable image by placing their own in the current working directory for the process and allow for arbitrary code execution. To avoid this potential security risk, simply do not set a value in the LaunchDesc::interpreter field and allow ILauncher to find the correct interpreter instead. The LaunchDesc::interpreter field should only be used when running a script file that is not a shell or Python script. If this cmd.exe name must be used, it should instead be given as an absolute path to the interpreter which has a default install location of c:\windows\system32\cmd.exe. More info on this potential security issue can be found at https://msrc.microsoft.com/blog/2014/04/ms14-019-fixing-a-binary-hijacking-via-cmd-or-bat-file/.