tkashkin / Adwaita-for-Steam

A skin to make Steam look more like a native GNOME app
MIT License
1.09k stars 25 forks source link

Fix: Do not overwrite args.target on Windows if value is set #251

Closed tsukasa closed 3 months ago

tsukasa commented 3 months ago

Short Description

Fixes the unexpected behaviour on Windows that causes the args.target always to be overwritten, effectively disabling the --target argument on Windows and requiring manual edits to the constants to change the target destination path.

This PR also changes the default behaviour on non-Windows systems, so that default values are no longer being strictly enforced when additional or explicit parameter values have been given for the --target argument.

How To Reproduce (Current Codebase)

  1. Call install.py with the --target argument on Windows and supply a custom path.
  2. Output the contents of args.target.
  3. The supplied custom path was lost, defaulting to the value windows.

How To Test (Pull Request)

  1. Same steps as for the reproduction.
  2. On non-Windows systems: 2.1. Do not specify the --target argument. 2.2. This will default to the values normal and flatpak. 2.3. Specify values for the --target argument (i.e. --target "flatpak" "/tmp/steam"). 2.4. Check args.target, only the specified values are present.