Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freebsd fix compilation #462

Merged
merged 6 commits into from
Dec 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

<!-- ## Unreleased -->
## Unreleased

### Fixed
- compilation broken on freebsd ([#461](https://github.com/extrawurst/gitui/issues/461))

## [0.11.0] - 2020-12-20

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ anyhow = "1.0.36"
unicode-width = "0.1"
textwrap = "0.13"

[target.'cfg(target_os = "linux")'.dependencies]
[target.'cfg(all(target_family="unix",not(target_os="macos")))'.dependencies]
which = "4.0"

# pprof is not available on windows
Expand Down
7 changes: 4 additions & 3 deletions src/clipboard.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use anyhow::{anyhow, Result};
#[cfg(target_os = "linux")]
#[cfg(target_family = "unix")]
#[cfg(not(target_os = "macos"))]
use std::ffi::OsStr;
use std::io::Write;
use std::process::{Command, Stdio};
Expand Down Expand Up @@ -27,7 +28,7 @@ fn execute_copy_command(command: Command, text: &str) -> Result<()> {
Ok(())
}

#[cfg(target_os = "linux")]
#[cfg(all(target_family = "unix", not(target_os = "macos")))]
fn gen_command(
path: impl AsRef<OsStr>,
xclip_syntax: bool,
Expand All @@ -42,7 +43,7 @@ fn gen_command(
c
}

#[cfg(target_os = "linux")]
#[cfg(all(target_family = "unix", not(target_os = "macos")))]
pub fn copy_string(string: &str) -> Result<()> {
use std::path::PathBuf;
use which::which;
Expand Down