@steerable/agent-shell-tauri 0.6.59 → 0.6.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/host.rs +8 -1
- package/src/python_runner.rs +16 -6
package/package.json
CHANGED
package/src/host.rs
CHANGED
|
@@ -588,7 +588,14 @@ fn node_compatible_path(path: &Path) -> PathBuf {
|
|
|
588
588
|
fn spawn_group(command: &mut Command) -> std::io::Result<GroupChild> {
|
|
589
589
|
#[cfg(windows)]
|
|
590
590
|
{
|
|
591
|
-
|
|
591
|
+
// node.exe is a console-subsystem binary. Hide it once this host is a
|
|
592
|
+
// GUI app, or Windows opens a second console at launch.
|
|
593
|
+
const CREATE_NO_WINDOW: u32 = 0x0800_0000;
|
|
594
|
+
return command
|
|
595
|
+
.group()
|
|
596
|
+
.kill_on_drop(true)
|
|
597
|
+
.creation_flags(CREATE_NO_WINDOW)
|
|
598
|
+
.spawn();
|
|
592
599
|
}
|
|
593
600
|
#[cfg(not(windows))]
|
|
594
601
|
{
|
package/src/python_runner.rs
CHANGED
|
@@ -368,6 +368,11 @@ async fn install(app: AppHandle, custom_url: Option<String>) -> PythonRunnerSnap
|
|
|
368
368
|
.args(["--runner", &context.target.runner, "--progress", "true"])
|
|
369
369
|
.stdout(Stdio::piped())
|
|
370
370
|
.stderr(Stdio::piped());
|
|
371
|
+
#[cfg(windows)]
|
|
372
|
+
{
|
|
373
|
+
const CREATE_NO_WINDOW: u32 = 0x0800_0000;
|
|
374
|
+
command.creation_flags(CREATE_NO_WINDOW);
|
|
375
|
+
}
|
|
371
376
|
#[cfg(unix)]
|
|
372
377
|
{
|
|
373
378
|
use std::os::unix::process::CommandExt;
|
|
@@ -571,12 +576,17 @@ async fn validate_local(path: &Path) -> Result<(), String> {
|
|
|
571
576
|
if !path.is_absolute() || !path.is_file() {
|
|
572
577
|
return Err("Python path must be an existing absolute file".into());
|
|
573
578
|
}
|
|
574
|
-
let
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
579
|
+
let mut command = Command::new(path);
|
|
580
|
+
command.args([
|
|
581
|
+
"-c",
|
|
582
|
+
"import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')",
|
|
583
|
+
]);
|
|
584
|
+
#[cfg(windows)]
|
|
585
|
+
{
|
|
586
|
+
const CREATE_NO_WINDOW: u32 = 0x0800_0000;
|
|
587
|
+
command.creation_flags(CREATE_NO_WINDOW);
|
|
588
|
+
}
|
|
589
|
+
let output = command.output()
|
|
580
590
|
.await
|
|
581
591
|
.map_err(|error| error.to_string())?;
|
|
582
592
|
if !output.status.success() {
|