Skip to content

t/op/glob.t - defend against ls with colors enabled #21157

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

Merged
merged 1 commit into from
Jun 17, 2023

Conversation

demerphq
Copy link
Collaborator

Disable any ENV vars with the word "color", "ls" or "cli" in them (case insensitively) before running ls. This appears to mostly be a BSD/darwin issue, but we do it on all platforms where we call ls in an abundance of caution.

Fixes #21156.

Disable any ENV vars with the word "color", "ls" or "cli" in them
(case insensitively) before running ls.  This appears to mostly
be a BSD/darwin issue, but we do it on all platforms where we call
ls in an abundance of caution.

Fixes #21156.
@demerphq
Copy link
Collaborator Author

FWIW, this is intended to be a minimal change to this file. I would prefer we rewrote it to have better diagnostics and to properly isolate %ENV var settings for all platforms, not just those using ls. but I didnt want to do that large a change before 5.38.0

@jkeenan
Copy link
Contributor

jkeenan commented Jun 16, 2023

Building this branch on FreeBSD, with these altered environmental settings:

export CLICOLOR=1; export LSCOLORS=Exfxcxdxbxegedabagacad; export CLICOLOR_FORCE=1

... t/op/glob.t now PASSes. +1

@demerphq
Copy link
Collaborator Author

now PASSes. +1

Thanks!

@rjbs rjbs merged commit d61ea02 into blead Jun 17, 2023
@rjbs
Copy link
Member

rjbs commented Jun 17, 2023

Thanks, applied!

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

Successfully merging this pull request may close these issues.

op/glob.t failing on macos monterey for 5.38.0-RC1
3 participants