Skip to content

Commit

Permalink
subshell: fix environment variable names in mc_shell_recognize_path
Browse files Browse the repository at this point in the history
Signed-off-by: Yury V. Zaytsev <[email protected]>
  • Loading branch information
zyv committed Jan 15, 2025
1 parent f609f6c commit 275878c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,17 @@ static void
mc_shell_recognize_path (mc_shell_t *mc_shell)
{
/* If shell is not symlinked to busybox, it is safe to assume it is a real shell */
if (strstr (mc_shell->path, "/bash") != NULL || getenv ("BASH") != NULL)
if (strstr (mc_shell->path, "/bash") != NULL || getenv ("BASH_VERSION") != NULL)
{
mc_shell->type = SHELL_BASH;
mc_shell->name = "bash";
}
else if (strstr (mc_shell->path, "/sh") != NULL || getenv ("SH") != NULL)
else if (strstr (mc_shell->path, "/sh") != NULL)
{
mc_shell->type = SHELL_SH;
mc_shell->name = "sh";
}
else if (strstr (mc_shell->path, "/ash") != NULL || getenv ("ASH") != NULL)
else if (strstr (mc_shell->path, "/ash") != NULL || getenv ("BB_ASH_VERSION") != NULL)
{
mc_shell->type = SHELL_ASH_BUSYBOX;
mc_shell->name = "ash";
Expand Down

0 comments on commit 275878c

Please sign in to comment.