Repository navigation
Deepen mdo C3: one handler invocation contract #45
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,13 +93,7 @@ mod linux_setup { | |
|
|
||
| pub fn run() -> io::Result<()> { | ||
| continue_after_launcher_registration(register_launcher()); | ||
| let mdo = sibling_binary("mdo")?; | ||
| if !mdo.exists() { | ||
| return Err(io::Error::new( | ||
| io::ErrorKind::NotFound, | ||
| format!("expected mdo next to mdo-setup at {}", mdo.display()), | ||
| )); | ||
| } | ||
| let mdo = mdo_cli::handler::sibling_binary(&std::env::current_exe()?, "mdo")?; | ||
|
|
||
| // Already attached to a terminal (e.g. run from a shell): show guided setup | ||
| // right here instead of spawning a second window. The `?` still | ||
|
|
@@ -254,12 +248,6 @@ mod linux_setup { | |
| .unwrap_or(false) | ||
| } | ||
|
|
||
| fn sibling_binary(name: &str) -> io::Result<PathBuf> { | ||
| let mut path = std::env::current_exe()?; | ||
| path.pop(); | ||
| Ok(path.join(name)) | ||
| } | ||
|
|
||
| #[cfg(test)] | ||
| mod tests { | ||
| use super::*; | ||
|
|
@@ -338,16 +326,7 @@ mod windows_setup { | |
| }; | ||
|
|
||
| pub fn run() -> io::Result<()> { | ||
| let mdo = sibling_binary("mdo.exe")?; | ||
| if !mdo.exists() { | ||
| return Err(io::Error::new( | ||
| io::ErrorKind::NotFound, | ||
| format!( | ||
| "expected mdo.exe next to mdo-setup.exe at {}", | ||
| mdo.display() | ||
| ), | ||
| )); | ||
| } | ||
| let mdo = mdo_cli::handler::sibling_binary(&std::env::current_exe()?, "mdo.exe")?; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [WARNING]: Dead check and now-unused import left over from the sibling_binary unification
Reply with |
||
|
|
||
| // Match the no-file `mdo-open.exe` onboarding path: prefer Windows | ||
| // Terminal for a styled, centered setup, then fall back to a plain new | ||
|
|
@@ -375,12 +354,6 @@ mod windows_setup { | |
| Ok(button) | ||
| } | ||
|
|
||
| fn sibling_binary(name: &str) -> io::Result<PathBuf> { | ||
| let mut path = std::env::current_exe()?; | ||
| path.pop(); | ||
| Ok(path.join(name)) | ||
| } | ||
|
|
||
| fn wide(value: &str) -> Vec<u16> { | ||
| value.encode_utf16().chain(iter::once(0)).collect() | ||
| } | ||
|
|
||
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.
[SUGGESTION]: Duplicated word in comment
Comment-only: "nested nested" looks like a doubled word.
Reply with
@kilocode-bot fix itto have Kilo Code address this issue.