Skip to content

Commit

Permalink
feat: support for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
daxartio committed Nov 3, 2023
1 parent d213b14 commit 6d53f41
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Check
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
Expand All @@ -34,7 +34,7 @@ jobs:
name: Test Suite
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
Expand All @@ -56,7 +56,7 @@ jobs:
name: Lints
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
Expand Down
2 changes: 1 addition & 1 deletion src/commands/pwd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fn clip(entry: &Entry, timeout: u8) -> Result<()> {

if set_clipboard(Some(pwd.to_string())).is_err() {
return Err(format!(
"Clipboard unavailable. Try use STDOUT, i.e. `kdbx clip '{}' | cat`.",
"Clipboard unavailable. Try use STDOUT, i.e. `kdbx pwd '{}' | cat`.",
entry.get_title().unwrap_or_default()
)
.into());
Expand Down
2 changes: 1 addition & 1 deletion src/commands/totp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub(crate) fn run(args: Args) -> Result<()> {
fn clip(entry: &Entry, raw: bool) -> Result<()> {
if set_clipboard(Some(get_totp(entry, raw))).is_err() {
return Err(format!(
"Clipboard unavailable. Try use STDOUT, i.e. `kdbx clip '{}' | cat`.",
"Clipboard unavailable. Try use STDOUT, i.e. `kdbx totp '{}' | cat`.",
entry.get_title().unwrap_or_default()
)
.into());
Expand Down
11 changes: 11 additions & 0 deletions src/keyring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,14 @@ impl fmt::Display for Keyring {
write!(f, "description: {})", self.desc.to_string_lossy())
}
}

#[cfg(target_os = "windows")]
#[derive(Display)]
pub struct Keyring;

#[cfg(target_os = "windows")]
impl Keyring {
fn new(keyname: String, account: String) -> Result<Self, String> {
Err("unimplemented")
}
}

0 comments on commit 6d53f41

Please sign in to comment.