-
Notifications
You must be signed in to change notification settings - Fork 540
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
docs: exec example #1312
docs: exec example #1312
Conversation
Welcome @cdaringe! |
@@ -11,7 +9,7 @@ exec.exec( | |||
'default', | |||
'nginx-4217019353-9gl4s', | |||
'nginx', | |||
command, | |||
['ls, '-al', '.'], |
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.
What would happen if you run it with: <typescript> ./examples/typescript/exec/exec-example.ts 'ls -al'
- that should work, right?
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 was getting “bin not found” errors doing as you suggest/ask. I presume the string vs array is encoded differently in the resultant url
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 see, I think I understand.
I think this is fine as this is only an example. Thank you.
/lgtm thank you |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cdaringe, mstruebing The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Problem
Cmd+arg was not clearly recorded in the examples, leading me to try zany things, like piping my cmds via stdin, but then the websocket closing prematurely
Solution
Make the default example clear that string[] is a permissible input for a req/res lifecycle of exec, despite being over a ws