Skip to content

Commit 65cc194

Browse files
Copilotjosecelano
andcommitted
fix: conditionally import unused modules on Windows
Make std::fs, std::process::Command, and tracing macros (debug, info) conditional with #[cfg(unix)] to avoid unused import warnings on Windows where the OpenTofu installer returns early. Co-authored-by: josecelano <58816+josecelano@users.noreply.github.com>
1 parent 1ebd884 commit 65cc194

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/dependency-installer/src/installer/opentofu.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
//! This module provides installation logic for the `OpenTofu` dependency.
44
55
// Standard library
6+
#[cfg(unix)]
67
use std::fs;
8+
#[cfg(unix)]
79
use std::process::Command;
810

911
// External crates
1012
use async_trait::async_trait;
13+
#[cfg(unix)]
1114
use tracing::{debug, info};
1215

1316
// Internal crate

0 commit comments

Comments
 (0)