You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
Git operations that use a pager (e.g., git log, git diff) fail with the following error when run inside the devcontainer.
error: cannot run less: No such file or directory
fatal: unable to execute pager 'less'
Reproducing the issue
Run the devcontainer on your machine, access the shell within it via docker exec or through the code-server web ui. docker run -it -v $pwd):/workspace -p 8080:8080 polar-dev:latest bash -c "/create-user.sh $(whoami) $(id -u) $(id -g)"/
Then, try to run git branch or any other git operation that requires a pager.
Possible Cause:
This error typically occurs when the less command-line utility, which Git uses as the default pager for displaying output, is not installed on the system or is not accessible in the system's PATH.
Potential Solutions:
(Provide suggestions or troubleshooting steps here. Contributors can add more ideas as needed.)
We could just Install less adding it to the flake definition.
Change Git Pager Configuration to use bat
For example: git config --global core.pager "bat"
We can probably avoid this entirely if we create a symlink from less to bat in the flake definition. If we haven't yet mounted a git config, this may be the time to do it with some other quality of life improvements.
Feel free to suggest additional solutions in the comments.
The text was updated successfully, but these errors were encountered:
Seems like we may just be able to get away with specifying the GIT_PAGER variable to = "cat" or whatever pager we wish. git -c core.pager="cat" <CMD> seems to be fine as a workaround til the change is made.
Description:
Git operations that use a pager (e.g.,
git log
,git diff
) fail with the following error when run inside the devcontainer.Reproducing the issue
Run the devcontainer on your machine, access the shell within it via docker exec or through the code-server web ui.
docker run -it -v $pwd):/workspace -p 8080:8080 polar-dev:latest bash -c "/create-user.sh $(whoami) $(id -u) $(id -g)"/
Then, try to run
git branch
or any other git operation that requires a pager.Possible Cause:
This error typically occurs when the
less
command-line utility, which Git uses as the default pager for displaying output, is not installed on the system or is not accessible in the system'sPATH
.Potential Solutions:
(Provide suggestions or troubleshooting steps here. Contributors can add more ideas as needed.)
We could just Install
less
adding it to the flake definition.Change Git Pager Configuration to use bat
For example:
git config --global core.pager "bat"
We can probably avoid this entirely if we create a symlink from
less
tobat
in the flake definition. If we haven't yet mounted a git config, this may be the time to do it with some other quality of life improvements.Feel free to suggest additional solutions in the comments.
The text was updated successfully, but these errors were encountered: