Skip to content

Commit

Permalink
Merge pull request #62 from mttaggart/taggart
Browse files Browse the repository at this point in the history
fix mac cfg directives
  • Loading branch information
mttaggart committed Mar 8, 2022
2 parents 4a92fe7 + d501d48 commit d92f6da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions agent/src/cmd/persist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ pub async fn handle(cmd_args: &mut CommandArgs, config_options: &mut ConfigOptio
}
}

#[cfg(unix)] {
#[cfg(target_os = "linux")] {

let app_path = args().nth(0).unwrap();
let home = var("HOME")?;
Expand Down Expand Up @@ -272,7 +272,7 @@ WantedBy=multi-user.target"
}
}

#[cfg(macos)] {
#[cfg(target_os = "macos")] {
let app_path = args().nth(0).unwrap();
let home = var("HOME")?;
let app_dir = format!("{home}/.notion");
Expand Down
4 changes: 2 additions & 2 deletions agent/src/cmd/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ pub async fn handle(cmd_args: &mut CommandArgs) -> Result<String, Box<dyn Error>
.expect("failed to execute process");
}

#[cfg(unix)] {
#[cfg(target_os = "linux")] {
output = Command::new("/bin/bash")
.arg("-c")
.arg(cmd_args.to_string())
.output()
.expect("failed to execute process");
}

#[cfg(macos)] {
#[cfg(target_os = "macos")] {
output = Command::new("/bin/zsh")
.arg("-c")
.arg(cmd_args.to_string())
Expand Down

0 comments on commit d92f6da

Please sign in to comment.