Skip to content

Commit 5310ffe

Browse files
committed
fix: restrict skim using on Windows (again)
1 parent 7ad4d05 commit 5310ffe

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/log.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
use duct::cmd;
2+
3+
#[cfg(unix)]
24
use skim::prelude::*;
5+
#[cfg(unix)]
36
use std::io::Cursor;
47

58
use crate::config::AppConfig;
@@ -47,6 +50,7 @@ pub(crate) fn command_log_mine(
4750
Ok(())
4851
}
4952

53+
#[cfg(unix)]
5054
pub(crate) fn pick_from_log_mine() -> anyhow::Result<String> {
5155
// Get the output from command_log_mine
5256
let revset = "mine() & ~description(exact:'') & bookmarks()";
@@ -118,3 +122,10 @@ pub(crate) fn pick_from_log_mine() -> anyhow::Result<String> {
118122

119123
Ok(commit_id.to_string())
120124
}
125+
126+
#[cfg(not(unix))]
127+
pub(crate) fn pick_from_log_mine() -> anyhow::Result<String> {
128+
Err(anyhow::anyhow!(
129+
"Interactive selection is not supported on Windows"
130+
))
131+
}

0 commit comments

Comments
 (0)