Fix the `cwd` argument of the `run_command` function
@@ -105,7 +105,7 @@ def run_command(
logger.debug("cmd = '%s'", " ".join(cmd))
- cwd = str(cwd) or str(Path.cwd())
+ cwd = str(cwd) if cwd else str(Path.cwd())
error_message = error_message or f"Command {cmd} failed."
# we need to pass complete env to Popen, otherwise we lose everything from os.environ
