Skip to content

fix: check bash session is interactive before modifying prompt#1299

Merged
RoyalOughtness merged 1 commit intosecureblue:livefrom
HastD:bash-prompt-interactive
Sep 1, 2025
Merged

fix: check bash session is interactive before modifying prompt#1299
RoyalOughtness merged 1 commit intosecureblue:livefrom
HastD:bash-prompt-interactive

Conversation

@HastD
Copy link
Copy Markdown
Collaborator

@HastD HastD commented Sep 1, 2025

Some scripts check whether the prompt variable PS1 is set to determine whether the shell is interactive. While this is less robust than checking $-, it's still a method mentioned in the bash manual, so we should make sure not to break this behavior and only modify PS1 if the shell is interactive.

Some scripts check whether the prompt variable `PS1` is set to determine
whether the shell is interactive. While this is less robust than
checking `$-`, it's still a method mentioned in the bash manual, so we
should make sure not to break this behavior and only modify `PS1` if the
shell is interactive.

Signed-off-by: Daniel Hast <[email protected]>
@dngray
Copy link
Copy Markdown

dngray commented Sep 1, 2025

Can confirm this fixed my login problems.

@RoyalOughtness RoyalOughtness merged commit ea055c3 into secureblue:live Sep 1, 2025
10 of 11 checks passed
@HastD HastD deleted the bash-prompt-interactive branch September 1, 2025 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants