Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 13, 2024
Merged

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

merged 1 commit into from
May 13, 2024

Conversation

tsukasa
Copy link
Contributor

@tsukasa tsukasa commented May 13, 2024

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.

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

This commit 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.
@tkashkin tkashkin merged commit d38c5df into tkashkin:master May 13, 2024
@tkashkin tkashkin mentioned this pull request May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants