feat(gcode_shell_command): allowing for expanding env vars (#747)

allowing for expanding env vars
This commit is contained in:
Clifford
2025-11-23 06:53:52 -05:00
committed by GitHub
parent d5062d41de
commit 372bab8847

View File

@@ -16,6 +16,7 @@ class ShellCommand:
self.gcode = self.printer.lookup_object("gcode")
cmd = config.get("command")
cmd = os.path.expanduser(cmd)
cmd = os.path.expandvars(cmd)
self.command = shlex.split(cmd)
self.timeout = config.getfloat("timeout", 2.0, above=0.0)
self.verbose = config.getboolean("verbose", True)