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
exec command returns before command is executed #1520
Comments
exec returns a promise to the underlying WebSocket, not to the command execution. If you want to wait for the command execution to complete, you need to wait on that callback that you passed in (the function that calls |
hi @brendandburns how to wait on that callback? |
You need to create a Details of promises here: |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
async function func1() {
const command = ['tar', 'zcf', '-'];
command.push('-C', cwd);
command.push(srcPath);
const writerStream = fs.createWriteStream(srcPath+".tar")
const errStream = new WritableStreamBuffer();
}
func1()
fs.rmSync(srcPath+".tar"(
I run the above code, fs.rmSync throws the tar file does not exist error, I feel the command is not executed immediately after exec finishes
The text was updated successfully, but these errors were encountered: