-
Notifications
You must be signed in to change notification settings - Fork 148
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
[BUG] "Jail not found" when both CLICOLOR & CLICOLOR_FORCE environment variables are set #858
Comments
This commit offers a fix. |
You can run those commands with -x to see what's going on. |
so I have to ask. What is color escape sequences and why do you have them. This is not a bastille bug. |
Setting the CLICOLOR environment variable seems to be a standard method for enabling colorized output for I believe this isn't an exotic shell environment scenario. Why not accommodate this fairly common FreeBSD setup? |
Can you share both vars and what you set them too? I'll investigate. EDIT: note to self - read OP |
This has nothing to do with the common.sh functions, but rather the "list.sh" command that is used inside common.sh to list all the jails. It uses "ls" to find them, and it looks like that might be interfering if one has the "CLICOLOR_FORCE" set to 1. |
|
Can you test #859? |
@vegged does the patch Victor wrote fix your issue? |
@vegged what do you have in your .shrc for turning on CLICOLOR etc. I can't seem to get it to twork for me . Trying to set it up to test and confirm the errror then the fix. |
@vegged here is my .shrc file. Are you using sh or another shell? Color works fine on all ls commands ll, l ls, etc. I cannot get an error listing jails in bastille with this set. What am I doing different than you, or what am I missing. I am using standard sh as my shell.
|
@vegged nevermind I was able to reproduce. Testing patch to fix this now. if I su to root the bug is not there. IF I sudo su to root the bug is there. |
Patch #859 has been merged to fix this. |
Yes, @tschettervictor's approach works great, and is much more subtle than my patch, which took a somehow shotgun approach to the problem 😅 Thanks to you both for helping out and pushing a fix! |
When both shell environment variables CLICOLOR & CLICOLOR_FORCE are set to 1, several
bastille
commands (console
,etcupdate
,htop
,jcp
,rename
,top
,update
) fail with the following error message:Forced color escape sequences likely mess with pattern matching in
common.sh
, as unsetting CLICOLOR_FORCE fixes the issue.Tested on Bastille 0.13.20250126 with zsh 5.9 (amd64-portbld-freebsd14.0) & GNU bash, version 5.2.37(0)-release (amd64-portbld-freebsd14.1) (all installed via
pkg
) on FreeBSD 14.2-RELEASE-p1.The text was updated successfully, but these errors were encountered: