Closed anders-kiaer closed 2 years ago
What are you printing? Perhaps it should only be printed when bash is run in interactive mode?
And how are you printing?
Printing "indirectly" by sourcing /prog/sdpsoft/env.sh
(which gives a printed line at source time it seems).
What does BASH_ENV= bash -c "echo foo"
print? Compare it to bash -c "echo foo"
.
The former gives no line, the latter prints the same line (and moving the source
command to .bash_profile
gives no printed line for both commands 👍).
The PR might not be a bulletproof fix. If this issue occurs again, feel free to reopen.
I have one line printed when a new terminal is started, resulting in the
assert
statement on line 71 https://github.com/equinor/komodoenv/blob/45d0ccd26c9d6f81c3503ec52e5c3a8931527c95/komodoenv/__main__.py#L59-L71 failing (3 !== 2
).Could one easy fix be to relax it to
>= 2
and then use the last two output lines (i.e. effectively ignoring any start-up messages the user has inbash
)?