mirror of
https://github.com/tiennm99/claude-code-usage-bubble.git
synced 2026-10-15 20:15:40 +00:00
fix: pass updater executable path to CreateProcess
This commit is contained in:
1 parent
cc73c3f9b4
commit
7039bf7e98
1 file changed
+2
-1
@@ -22,6 +22,7 @@ use windows::Win32::System::Threading::{
|
|||||||
/// so no zombie wait is required.
|
/// so no zombie wait is required.
|
||||||
pub fn spawn_detached(exe: &Path, args: &[OsString]) -> io::Result<()> {
|
pub fn spawn_detached(exe: &Path, args: &[OsString]) -> io::Result<()> {
|
||||||
let mut cmdline = build_command_line(exe, args);
|
let mut cmdline = build_command_line(exe, args);
|
||||||
|
let exe_w: Vec<u16> = exe.as_os_str().encode_wide().chain(Some(0)).collect();
|
||||||
|
|
||||||
let si = STARTUPINFOW {
|
let si = STARTUPINFOW {
|
||||||
cb: std::mem::size_of::<STARTUPINFOW>() as u32,
|
cb: std::mem::size_of::<STARTUPINFOW>() as u32,
|
||||||
@@ -32,7 +33,7 @@ pub fn spawn_detached(exe: &Path, args: &[OsString]) -> io::Result<()> {
|
|||||||
let flags = CREATE_NO_WINDOW | DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP;
|
let flags = CREATE_NO_WINDOW | DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP;
|
||||||
let ok = unsafe {
|
let ok = unsafe {
|
||||||
CreateProcessW(
|
CreateProcessW(
|
||||||
PCWSTR::null(),
|
PCWSTR::from_raw(exe_w.as_ptr()),
|
||||||
windows::core::PWSTR(cmdline.as_mut_ptr()),
|
windows::core::PWSTR(cmdline.as_mut_ptr()),
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
|
|||||||
Reference in new issue
Block a user