Skip to content

Commit

Permalink
feat(cwd-pane): Add non Linux/MacOS targets for the get_cwd method.
Browse files Browse the repository at this point in the history
This will allow Zellij to compile on non Linux/MacOS targets without
having an inherited cwd.
  • Loading branch information
Jesse Tuchsen committed Sep 7, 2021
1 parent 1653cab commit 5f13c95
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zellij-server/src/os_input_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,10 @@ impl ServerOsApi for ServerOsInputOutput {
fn get_cwd(&self, pid: Pid) -> Option<PathBuf> {
fs::read_link(format!("/proc/{}/cwd", pid)).ok()
}
#[cfg(all(not(target_os = "linux"), not(target_os = "macos")))]
fn get_cwd(&self, _pid: Pid) -> Option<PathBuf> {
None
}
}

impl Clone for Box<dyn ServerOsApi> {
Expand Down

0 comments on commit 5f13c95

Please sign in to comment.