Skip to content

Commit 4d611e7

Browse files
committed
Dividing the Actions PR - Linux
1 parent 25649c8 commit 4d611e7

File tree

6 files changed

+28
-200
lines changed

6 files changed

+28
-200
lines changed

.github/workflows/build_mac.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/build_windows.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

Cargo.lock

Lines changed: 6 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ libc = "0.2" # For setpgid and signal constants
2222
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] } # For logging setup
2323
tempfile = "3" # For creating temporary directories in examples/tests
2424
anyhow = "1.0" # For simple error handling in examples
25-
windows-sys = { version = "0.59.0", features = ["Win32", "Win32_System", "Win32_System_Threading", "Win32_Foundation"] }
2625
# Dependency on the library itself (needed for building examples within the workspace)
2726
# This line might not be strictly necessary if cargo automatically detects it,
2827
# but explicitly listing it can sometimes help.

examples/git_clone_kernel.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
// examples/git_clone_kernel.rs
2-
#[cfg(unix)]
3-
use std::os::unix::process::ExitStatusExt;
4-
#[cfg(windows)]
5-
use std::os::windows::process::ExitStatusExt;
2+
63
use command_timeout::{run_command_with_timeout, CommandError, CommandOutput};
4+
use std::os::unix::process::ExitStatusExt;
75
use std::path::PathBuf; // <<< Import PathBuf
86
use std::process::{Command, ExitStatus};
97
use std::time::Duration;
@@ -36,11 +34,11 @@ async fn main() -> Result<(), anyhow::Error> {
3634
let min_timeout = Duration::from_secs(10);
3735
let max_timeout = Duration::from_secs(60 * 60 * 24 * 7); // 1 week (effectively infinite)
3836
let activity_timeout = Duration::from_secs(60 * 5); // 5 minutes
39-
// -----------------------------
37+
// -----------------------------
4038

4139
// Create a temporary directory builder
4240
let temp_dir_builder = Builder::new().prefix("kernel_clone_persistent").tempdir()?; // Use a different prefix
43-
// --- CHANGE: Keep the path instead of the TempDir object ---
41+
// --- CHANGE: Keep the path instead of the TempDir object ---
4442
let clone_target_path_buf: PathBuf = temp_dir_builder.into_path();
4543
// --- END CHANGE ---
4644
let clone_target_path_str = clone_target_path_buf.to_str().unwrap_or("."); // Use "." as fallback if path invalid unicode
@@ -124,14 +122,9 @@ fn handle_command_output(output: CommandOutput) {
124122
warn!("Exit Code: {}", code);
125123
}
126124
// signal() is now available because ExitStatusExt is in scope
127-
#[cfg(unix)]
128125
if let Some(signal) = status.signal() {
129126
warn!("Terminated by Signal: {}", signal);
130127
}
131-
#[cfg(windows)]
132-
if let Some(code) = status.code() {
133-
warn!("Exit Code: {}", code);
134-
}
135128
}
136129
} else {
137130
warn!("Exit Status: None (Killed by timeout, status unavailable?)");

0 commit comments

Comments
 (0)