Skip to content

Commit 46ee802

Browse files
authored
CBST-11: windows warning (#186)
1 parent aa080ba commit 46ee802

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

crates/cli/src/docker_cmd.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ fn is_command_available(command: &str) -> bool {
7878

7979
pub fn handle_docker_start(compose_path: String, env_path: Option<String>) -> Result<()> {
8080
println!("Starting Commit-Boost with compose file: {}", compose_path);
81+
windows_not_supported();
8182

8283
// load env file if present
8384
if let Some(env_path) = env_path {
@@ -93,6 +94,7 @@ pub fn handle_docker_start(compose_path: String, env_path: Option<String>) -> Re
9394

9495
pub fn handle_docker_stop(compose_path: String, env_path: String) -> Result<()> {
9596
println!("Stopping Commit-Boost with compose file: {}", compose_path);
97+
windows_not_supported();
9698

9799
// load env file
98100
dotenvy::from_filename_override(env_path)?;
@@ -105,9 +107,21 @@ pub fn handle_docker_stop(compose_path: String, env_path: String) -> Result<()>
105107

106108
pub fn handle_docker_logs(compose_path: String) -> Result<()> {
107109
println!("Querying Commit-Boost with compose file: {}", compose_path);
110+
windows_not_supported();
108111

109112
// start docker compose
110113
run_docker_compose!(compose_path, "logs", "-f");
111114

112115
Ok(())
113116
}
117+
118+
#[cfg(target_os = "windows")]
119+
fn windows_not_supported() {
120+
eprintln!(
121+
"Windows is currently only partially supported, please run `docker compose` manually and consider filing an issue at https://github.com/Commit-Boost/commit-boost-client"
122+
);
123+
std::process::exit(1);
124+
}
125+
126+
#[cfg(not(target_os = "windows"))]
127+
fn windows_not_supported() {}

0 commit comments

Comments
 (0)