From 1f835e01fc14f156e0888f83b09cef8617d476eb Mon Sep 17 00:00:00 2001 From: pagdot Date: Sun, 18 Feb 2024 13:47:22 +0100 Subject: [PATCH] Fix for postprocessing scripts not working on UNIX when $SHELL is undefined (#4101) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix for PP scripts not working on UNIX when $SHELL is undefined thanks @jfbauer432 for pointing the problem out. thanks @lukasmatena for fixing it in PrusaSlicer (commit 87a5116) Co-authored-by: Lukáš Matěna --- src/libslic3r/GCode/PostProcessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/GCode/PostProcessor.cpp b/src/libslic3r/GCode/PostProcessor.cpp index ef20d6d3d8..927d106b5f 100644 --- a/src/libslic3r/GCode/PostProcessor.cpp +++ b/src/libslic3r/GCode/PostProcessor.cpp @@ -157,7 +157,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 };