Skip to content

Commit

Permalink
fix: Use cfg covers target_os exactly windows, not other which not af…
Browse files Browse the repository at this point in the history
…fects
  • Loading branch information
DPS0340 committed Jun 27, 2024
1 parent 1296187 commit 9f2ab0b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/executor/initializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ WantedBy=multi-user.target"#;
self.write_and_check_err(base_path, script).await
}

#[cfg(target_os = "windows")]
async fn create_daemon_config_if_not_exists(&self) -> Result<(), RRDBError> {
todo!();
}

async fn write_and_check_err(
&self,
base_path: PathBuf,
Expand All @@ -151,11 +156,6 @@ WantedBy=multi-user.target"#;
Ok(())
}

#[cfg(other)]
async fn create_daemon_config_if_not_exists(&self) -> Result<(), RRDBError> {
todo!();
}

async fn start_daemon(&self) -> Result<(), RRDBError> {
let (program, args) = self.get_daemon_start_command();
let output = Command::new(program).args(args).output();
Expand All @@ -173,7 +173,7 @@ WantedBy=multi-user.target"#;
("launchctl", vec!["load", LAUNCHD_PLIST_PATH])
}

#[cfg(other)]
#[cfg(target_os = "windows")]
fn get_daemon_start_command(&self) -> (&'static str, Vec<&'static str>) {
todo!()
}
Expand Down

0 comments on commit 9f2ab0b

Please sign in to comment.