Fix of #8766: PP scripts not working on UNIX when $SHELL is undefined:

thanks @jfbauer432 for pointing the problem out.
This commit is contained in:
Lukas Matena 2022-08-30 10:50:19 +02:00
parent de48bcd1b2
commit 87a51165f3

View file

@ -153,7 +153,7 @@ static int run_script(const std::string &script, const std::string &gcode, std::
{
// Try to obtain user's default shell
const char *shell = ::getenv("SHELL");
if (shell == nullptr) { shell = "sh"; }
if (shell == nullptr) { shell = "/bin/sh"; }
// Quote and escape the gcode path argument
std::string command { script };