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

Save pre/post-scripts paths with None instead of "" on reset #3620

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

EmoonX
Copy link
Contributor

@EmoonX EmoonX commented Dec 20, 2024

Description

So far, whenever resetting a pre/post-script path for a program, the value "" (empty string) was used. In such cases, the checks below have been useless and the program would always try to append/prepend sh '' (which thankfully didn't do anything):

if post_script is not None:
    command = f"{command} ; sh '{post_script}'"

if pre_script is not None:
    command = f"sh '{pre_script}' ; {command}"

Now, and for consistency, settings are always saved with the value None instead to indicate their absence.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@EmoonX EmoonX changed the title Save pre/post-scripts config with the value None instead of "" on reset Save pre/post-scripts paths with the value None instead of "" on reset Dec 20, 2024
@EmoonX EmoonX changed the title Save pre/post-scripts paths with the value None instead of "" on reset Save pre/post-scripts paths with None instead of "" on reset Dec 20, 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.

1 participant