Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions fail in gitcl when shell prints text in non-interactive mode #362

Open
Jomosoto opened this issue Aug 7, 2024 · 0 comments
Open

Comments

@Jomosoto
Copy link

Jomosoto commented Aug 7, 2024

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: pop-os/cosmic-files#250)

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

No branches or pull requests

1 participant