mirror of https://github.com/dswd/zvault
Fixes
This commit is contained in:
parent
205c193108
commit
6f5cb66065
|
@ -261,8 +261,8 @@ pub fn parse() -> Arguments {
|
|||
(@subcommand addkey =>
|
||||
(about: "adds a key to the respository")
|
||||
(@arg REPO: +required "path of the repository")
|
||||
(@arg generate: --generate "generate a new key")
|
||||
(@arg set_default: --default "set this key as default")
|
||||
(@arg generate: --generate -g "generate a new key")
|
||||
(@arg set_default: --default -d "set this key as default")
|
||||
(@arg FILE: +takes_value "the file containing the keypair")
|
||||
)
|
||||
(@subcommand algotest =>
|
||||
|
|
|
@ -146,13 +146,14 @@ pub fn run() {
|
|||
}, remote_path).unwrap();
|
||||
if encryption {
|
||||
let (public, secret) = gen_keypair();
|
||||
println!("Public key: {}", to_hex(&public[..]));
|
||||
println!("Secret key: {}", to_hex(&secret[..]));
|
||||
println!("public: {}", to_hex(&public[..]));
|
||||
println!("secret: {}", to_hex(&secret[..]));
|
||||
repo.set_encryption(Some(&public));
|
||||
repo.register_key(public, secret).unwrap();
|
||||
repo.save_config().unwrap();
|
||||
print_config(&repo.config);
|
||||
println!();
|
||||
}
|
||||
print_config(&repo.config);
|
||||
},
|
||||
Arguments::Backup{repo_path, backup_name, src_path, full, reference} => {
|
||||
let mut repo = open_repository(&repo_path);
|
||||
|
|
Loading…
Reference in New Issue