fix(platform): in the Flatpak a pass's shell is bash

Flatpak sets SHELL to /bin/sh, the host's (zsh here) being no file of
the Sdk's, and claude's Bash tool runs commands with bash or zsh. In the
sandbox SHELL becomes /bin/bash unless it names a bash or zsh that is
there. Found by the sandbox checks: a pass's environment had SHELL=/bin/sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jorijn van der Graaf 2026-10-31 16:09:40 +01:00
commit aaa0bb1059
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
3 changed files with 30 additions and 1 deletions

View file

@ -51,6 +51,11 @@ export namespace Crafter::Review::Platform {
// $HOME), so git reads ~/.config/git/config, Playwright finds
// ~/.cache/ms-playwright, and claude and npx behave as on the host.
void RestoreHostXdg();
// Flatpak sets SHELL to /bin/sh, the host's (zsh here) being no file of
// the Sdk's. claude's Bash tool runs commands with bash or zsh, and the
// Sdk has bash: SHELL becomes /bin/bash unless it already names a bash
// or zsh that is there.
void RestoreShell();
// The absolute path of the running binary (/proc/self/exe).
std::filesystem::path SelfExe();