Skip to content

Commit

Permalink
fix: bash: [: -q: binary operator expected (#237)
Browse files Browse the repository at this point in the history
Signed-off-by: Chapman Pendery <[email protected]>
  • Loading branch information
cpendery authored Apr 14, 2024
1 parent b5c060c commit 375a6f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ export const getShellConfig = (shell: Shell): string => {
fi`;
case Shell.Bash:
return `if [[ -z "\${ISTERM}" && $- = *i* && $- != *c* ]]; then
if [ shopt -q login_shell ]; then
shopt -q login_shell
login_shell=$?
if [ $login_shell -eq 0 ]; then
is -s bash --login ; exit
else
is -s bash ; exit
Expand Down

0 comments on commit 375a6f9

Please sign in to comment.