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 running scripts without arguments #9683

Merged

Conversation

pmiossec
Copy link
Member

Fixes #9660

because when there are no arguments, argument value is null
and the check is throwing an exception.

Remove the check because it doesn't cause a problem to the process
if null is passed...

Screenshots

Before

image

After

No error

Test methodology

  • Manual:
    • Create a new script with no arguments (arguments is null and so, not serialized)
    • Launch this script

Test environment(s)

  • Git Extensions 33.33.33
  • Build 24f71be (Dirty)
  • Git 2.28.0.windows.1 (recommended: 2.30.0 or later)
  • Microsoft Windows NT 10.0.19042.0
  • .NET 5.0.11
  • DPI 192dpi (200% scaling)

Merge strategy

I agree that the maintainer squash merge this PR (if the commit message is clear).


✒️ I contribute this code under The Developer Certificate of Origin.

Fixes gitextensions#9660

because when there are no arguments, `argument` value is null
and the check is throwing an exception.

Remove the check because it doesn't cause a problem to the process
if null is passed...
@ghost ghost assigned pmiossec Oct 25, 2021
Copy link
Member

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annotation allows null, so this should be OK

@RussKie RussKie merged commit 89b9869 into gitextensions:master Oct 26, 2021
@ghost ghost added this to the vNext milestone Oct 26, 2021
@pmiossec pmiossec deleted the fix_running_script_without_arguments branch October 27, 2021 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[NBug] Value must not be null.
3 participants