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(provider): split task.RunCommand into RunCommand and RunCommandWhileStopped #64

Merged
merged 18 commits into from
Jan 30, 2024

Conversation

Zygimantass
Copy link
Contributor

No description provided.

@@ -224,6 +225,43 @@ func (p *Provider) RunCommand(ctx context.Context, id string, command []string)
return stdout.String(), stderr.String(), execInspect.ExitCode, nil
}

func (p *Provider) RunCommandWhileStopped(ctx context.Context, id string, definition provider.TaskDefinition, command []string) (string, string, int, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's generally better to return structs, or name the return variables when they go above like 2 or 3.

I would do one of those. Otherwise it can be confusing to reason what is being returned from this func.

Godoc comment would help too

@Zygimantass Zygimantass merged commit 0723005 into main Jan 30, 2024
7 checks passed
@Zygimantass
Copy link
Contributor Author

@Mergifyio backport release/v2.x.x

Copy link

mergify bot commented Jan 30, 2024

backport release/v2.x.x

❌ No backport have been created

  • Backport to branch release/v2.x.x failed

Git reported the following error:

error: commit e6226fb90f97e2a1dd021a0bd7c293722a790eb3 is a merge but no -m option was given.
fatal: cherry-pick failed

Zygimantass added a commit that referenced this pull request Jan 30, 2024
fix(provider): split task.RunCommand into RunCommand and RunCommandWhileStopped
@Zygimantass Zygimantass deleted the zygis/add-run-command-while-stopped branch January 31, 2024 17:04
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