You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The tauri::process::Command API has a bug on the tokio mpsc usage: the stdout line is sent on the channel but the receiver only sees the message when the process is terminated.
To Reproduce
Steps to reproduce the behavior:
Open the API example
Click on the shell tab
Run the following command: `node -e "console.log('message'); while(true){}"
You'll see that the output is only seen when you click on the "kill" button
Expected behavior
The stdout line is seen immediately.
The text was updated successfully, but these errors were encountered:
Hi I've been playing with Tauri and there seems to still be a issue with this unless I'm just being dumb. I am running the following in the browser/webview using the typescript api and no stdout or stderr is printed. The close event is fired and a pid is printed.
import * as tauri from '@tauri-apps/api'
try {
const test = await tauri.path.resolvePath('C:\\Program Files\\Git\\cmd\\git.exe')
console.log(test)
const git = new tauri.shell.Command(test, ['status'])
git.stdout = function (e) {
console.log(e)
}
git.stderr = function (e) {
console.log(e)
}
git.on('close', (arg) => {
console.log(arg)
})
const myProcess = await git.spawn()
console.log(myProcess)
} catch (error) {
console.log(JSON.stringify(error))
}
Describe the bug
The
tauri::process::Command
API has a bug on the tokio mpsc usage: the stdout line is sent on the channel but the receiver only sees the message when the process is terminated.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The stdout line is seen immediately.
The text was updated successfully, but these errors were encountered: