Skip to content

Commit ac9f277

Browse files
Merge pull request #387 from joshrotenberg/fix/unused-variable-382
fix: remove unused variable warning on Windows builds
2 parents a7094d7 + a3971f8 commit ac9f277

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

crates/redisctl/src/commands/enterprise/support_package.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -396,16 +396,13 @@ fn perform_preflight_checks(output_path: &Path) -> AnyhowResult<()> {
396396
}
397397

398398
// Check available disk space (warn if less than 1GB)
399+
// Only perform check on Unix systems where we can read block count
400+
#[cfg(unix)]
399401
if let Ok(metadata) = fs::metadata(parent_dir) {
400-
// This is platform-specific and would need proper implementation
401-
// For now, just a placeholder check
402-
#[cfg(unix)]
403-
{
404-
use std::os::unix::fs::MetadataExt;
405-
// Basic check - would need proper disk space checking
406-
if metadata.blocks() < 1000000 {
407-
eprintln!("Warning: Low disk space detected");
408-
}
402+
use std::os::unix::fs::MetadataExt;
403+
// Basic check - would need proper disk space checking
404+
if metadata.blocks() < 1000000 {
405+
eprintln!("Warning: Low disk space detected");
409406
}
410407
}
411408

0 commit comments

Comments
 (0)