Skip to content

Commit 5e66f19

Browse files
committed
Linux server install: try to resolve sh command rather than always using /bin/sh
* /bin/sh might be a different shell that can't execute the uv install script on some distros
1 parent 5aaf0df commit 5e66f19

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ai_diffusion/server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ async def _install_uv(self, network: QNetworkAccessManager, cb: InternalCB):
224224
log.warning(f"powershell command not found, trying to find it at {cmd[0]}")
225225
await _execute_process("Python", cmd, self.path, cb, env=env)
226226
else:
227-
cmd = ["/bin/sh", str(script_path)]
227+
sh = _find_program("sh") or Path("/bin/sh")
228+
cmd = [str(sh), str(script_path)]
228229
await _execute_process("Python", cmd, self.path, cb, env=env)
229230

230231
self._uv_cmd = self.path / "uv" / ("uv" + _exe)

0 commit comments

Comments
 (0)