bug#46625: tramp-test33-environment-variables fails

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#46625: tramp-test33-environment-variables fails

Glenn Morris-3
Package: emacs
Severity: minor
Version: 28.0.50

tramp-test33-environment-variables fails on hydra.nixos since
e5f50f32f76bab2607d77f0dc51cf81ec0c1e232.

It seems to me that:

(string-match-p (regexp-quote envvar) "printenv")

isn't a robust way to test if ENVVAR is (not) set, because it can
falsely match on $_=ENVVAR.



Reply | Threaded
Open this post in threaded view
|

bug#46625: tramp-test33-environment-variables fails

Glenn Morris-3

What is the printenv check telling you that the preceding ${var:-} one
doesn't?

Why does the test use "set" to double-check a variable is set,
but "printenv" to double-check it's unset?

Why not search for ^ENVVAR= rather than doing a second grep to remove $_?