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
Get rid of shell-out and invoke command directly via exec #334
Conversation
cmd/gotk/utils.go
Outdated
@@ -62,7 +62,12 @@ const ( | |||
|
|||
func (*Utils) execCommand(ctx context.Context, mode ExecMode, command string) (string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please change the signature to:
execKubectlCommand(ctx context.Context, mode ExecMode, arg ...string) (string, error)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the signature change we need to pass an args array, so the current string concatenation should be rewritten to array append.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please rebase with main.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I squash it or smth?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please squash
f3c7297
to
84de13e
Compare
84de13e
to
ab67f3c
Compare
@StupidScience can you give this a try on Windows and see if it works? Thanks |
ab67f3c
to
fae3775
Compare
fae3775
to
4989826
Compare
Squashed. Also I tried to run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @StupidScience 🎖️
Hello.
Please let me know if this is something you expect here.
Or would be better to switch
execCommand
to something likeexecCommand(ctx context.Context, mode ExecMode, commandName string, args ...string)
?Related to #47