I discovered this issue when trying to debug another problem, where the Steam client starts another Steam client right after logging in, recursively.
I have a somewhat unconventional setup at the moment, so I'm not sure if it's a bug in the Steam client proper, in the steam.sh script, or in my setup.
It doesn't help that the Steam client forcefully undoes any changes I make to the steam.sh script every time it starts. If there's a way to tell it not to do that, I'd like to know it.
Nothing extracted yet.
In the current version of the steam.sh script†, the variable INITIAL_LAUNCH is set as follows:
This variable is then used in the following lines:
Line 453:
Line 582:
Lines 769 through 773:
The value of the variable makes no difference in any of these tests.
In the first two cases, the test always succeeds. It would only fail if the variable were unset or empty.
Previously, this script didn't set the variable to the string "false" as it does now; it simply didn't set the variable. That effectively worked, unless the script was started with an environment variable with that name set to a non-empty string, in which case it'd have the same behavior as it has now (always testing positive).
A clean way to fix this is to replace all tests with:
Remember: the strings "true" and "false" don't have any special meaning.
They might as well be "foo" and "bar," for all bash cares.
Also, consider following the practice of using lowercase names for script-local variables, i.e. stuff that's not passed as an environment variable to child processes.
† steam.sh info: