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

Provide NULL instead of empty string, when Extra CLI Arguments was deleted #286

Merged
merged 1 commit into from
Mar 13, 2017

Conversation

strangeman
Copy link
Contributor

Fix for #171

@matejkramny
Copy link
Contributor

What if template.Arguments is nil, in which case this might cause a panic?

@strangeman
Copy link
Contributor Author

@matejkramny it shouldn't. We use template.Arguments in two places only, as I see:

@strangeman
Copy link
Contributor Author

strangeman commented Mar 11, 2017

BTW, we may use another solution:

In https://github.com/ansible-semaphore/semaphore/blob/master/api/tasks/runner.go#L310:

- 	if t.template.Arguments != nil {
+ 	if t.template.Arguments != nil && *t.template.Arguments != "" {

@matejkramny matejkramny merged commit 37c6d17 into semaphoreui:master Mar 13, 2017
@strangeman strangeman deleted the empty-cli-args branch March 13, 2017 00:58
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