Skip to content

Commit

Permalink
Provide fallback directory for active shell under test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Wootten authored and Jeremy Wootten committed Nov 19, 2024
1 parent 30f71a6 commit 0420ee3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Widgets/TerminalWidget.vala
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,19 @@ namespace Terminal {
string shell = Application.settings.get_string ("shell");
string?[] envv = null;

if (shell == "")
if (shell == "") {
shell = Vte.get_user_shell ();
}

if (shell == "") {
critical ("No user shell available");
return;
}

if (dir == "") {
debug ("Using fallback directory");
dir = "/";
}

envv = {
// Export ID so we can identify the terminal for which the process completion is reported
Expand Down

0 comments on commit 0420ee3

Please sign in to comment.