Skip to content
Snippets Groups Projects
Commit e71023ff authored by Simon McVittie's avatar Simon McVittie
Browse files

launcher: Always set PWD to the command's actual working directory


pressure-vessel-wrap unsets PWD, but we don't want the command to inherit
a value of PWD from the launcher. In particular, when running in session
mode, the launcher's $PWD is the Steam installation, typically
~/.local/share/Steam, and the setup commands are also run with that
working directory, but the actual game is run with the current working
directory set to its own game directory (which we didn't necessarily
even know at the time that the launcher was started).

Consumers of $PWD should really check that it is equivalent to the
actual current working directory and ignore it if it does not, like
GNU get_current_dir_name(3) and our pv_get_current_dirs() do, but
blindly believing $PWD is a common shell-scripting mistake, and I
wouldn't be surprised if there are some games whose launcher scripts
will believe $PWD even when it doesn't coincide with the real working
directory.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 1bde4ae9
No related branches found
No related tags found
Loading
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment