Browse Source

Fix merge not re-locking vault.

tags/v0.3.4
Thomas Kerber 1 year ago
parent
commit
a7a434e092
Signed by: Thomas Kerber <t.kerber@ed.ac.uk> GPG Key ID: 8489B911F9ED617B
6 changed files with 1022 additions and 923 deletions
  1. +234
    -218
      Cargo.lock
  2. +782
    -701
      Cargo.nix
  3. +1
    -1
      Cargo.toml
  4. +1
    -1
      default.nix
  5. +3
    -1
      src/cmd/merge.rs
  6. +1
    -1
      update.sh

+ 234
- 218
Cargo.lock
File diff suppressed because it is too large
View File


Cargo.nix
File diff suppressed because it is too large
View File


+ 1
- 1
Cargo.toml View File

@@ -1,6 +1,6 @@
[package]
name = "goblin"
version = "0.3.1"
version = "0.3.2"
authors = ["Thomas Kerber <tk@drwx.org>"]
description = "Version controlled password management."
publish = false

+ 1
- 1
default.nix View File

@@ -1,5 +1,5 @@
with import <nixpkgs> { };
((callPackage ./carnix.nix { }).goblin { }).override {
((callPackage ./Cargo.nix { }).goblin { }).override {
release = false;
crateOverrides = defaultCrateOverrides // {
libgpg-error-sys = attrs: {

+ 3
- 1
src/cmd/merge.rs View File

@@ -55,7 +55,9 @@ pub fn main(matches: &ArgMatches) -> Result<()> {
let _: () = cli.call("goblin.perms.unlock", (vec![spec], pass))?;
}
let res = merge(&cfg, &mut cli, matches.value_of("VAULT").unwrap());
if !already_unlocked && res.is_ok() && res.as_ref().unwrap() == &true {
if !already_unlocked &&
(res.is_err() || (res.is_ok() && res.as_ref().unwrap() == &true))
{
let _: () = cli.call("goblin.perms.lock", (vec![
Access::new(Scope::Global, true),
],))?;

+ 1
- 1
update.sh View File

@@ -1,4 +1,4 @@
#!/bin/sh
cargo update
sed -i 's/?branch=[a-z\-]*//g' Cargo.lock
carnix Cargo.lock -o carnix.nix
carnix nix --src=./.

Loading…
Cancel
Save