mirror of
https://github.com/extrawurst/gitui.git
synced 2024-12-26 18:43:37 +03:00
Freebsd fix compilation (#462)
This commit is contained in:
parent
c19567e59b
commit
5080b822f1
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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};
|
||||
@ -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,
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user