When the users shell is configured to print text even though it is ran non-interactively, some functions (like check_inside_git_worktreehere) produce incorrect results. This happens because it parses the output of git commands, ran by executing $SHELL with -c [git command] (here). If the shell prints any additional text, the output is always invalid.
This may not count as a bug, as you can normally expect that shells don't print anything when ran non-interactively (especially as bash doesn't source the .bashrc when ran non-interactively), but in shells like fish where you have to actively decide what commands shouldn't be ran when non-interactive it can happen that users that never thought about this (including me before coming across this issue) print something anyways. (Leading to issues like: https://github.com/pop-os/cosmic-files/issues/250)
When the users shell is configured to print text even though it is ran non-interactively, some functions (like
check_inside_git_worktree
here) produce incorrect results. This happens because it parses the output of git commands, ran by executing$SHELL
with-c [git command]
(here). If the shell prints any additional text, the output is always invalid.This may not count as a bug, as you can normally expect that shells don't print anything when ran non-interactively (especially as bash doesn't source the .bashrc when ran non-interactively), but in shells like fish where you have to actively decide what commands shouldn't be ran when non-interactive it can happen that users that never thought about this (including me before coming across this issue) print something anyways. (Leading to issues like: https://github.com/pop-os/cosmic-files/issues/250)