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

Shell resource new function #61

Closed
alileza opened this issue Nov 15, 2018 · 0 comments · Fixed by #104
Closed

Shell resource new function #61

alileza opened this issue Nov 15, 2018 · 0 comments · Fixed by #104

Comments

@alileza
Copy link
Member

alileza commented Nov 15, 2018

Is your feature request related to a problem? Please describe.
There is no way we can check exit code from executed command in shell resource

Describe the solution you'd like
Would be nice to add a new function to get latest exit code from executed command

https://github.com/tomatool/tomato/blob/master/handler/shell/shell.go#L10

something like

type Resource interface {
	resource.Resource

	Exec(command string, arguments ...string) error
	ExitCode() (int, error)
	Stdout() (string, error)
	Stderr() (string, error)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant