From 2d4413d3feb73651a52617d5700185c86b907f2d Mon Sep 17 00:00:00 2001 From: "Manuel Amador (Rudd-O)" Date: Sat, 18 Dec 2021 23:29:45 +0000 Subject: [PATCH] Fix argument parsing again. --- bin/qvm-pass | 6 ++++-- qubes-pass.spec | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/qvm-pass b/bin/qvm-pass index 3c647ff..b44a843 100755 --- a/bin/qvm-pass +++ b/bin/qvm-pass @@ -337,13 +337,14 @@ if not "--help" in arguments and not "-h" in arguments and not "-?" in arguments ): global_opts.arguments = ["show"] + global_opts.arguments arguments = global_opts.arguments +global_opts opts = parser_for_subcommands.parse_args(arguments) -if not opts.dest_vm: +if not global_opts.dest_vm: try: with open("/rw/config/pass-split-domain") as domain: - opts.dest_vm = domain.readlines()[0].strip() + global_opts.dest_vm = domain.readlines()[0].strip() except FileNotFoundError: pass if not opts.dest_vm: @@ -353,6 +354,7 @@ if not opts.dest_vm: " your pass setup, set the environment variable yourself," " or pass -d on the command line.", ) +opts.dest_vm = global_opts.dest_vm if opts.subcommand == "ls" or (opts.subcommand == "show" and opts.key is None): # User requested ls, or no argument, or show with no argument. diff --git a/qubes-pass.spec b/qubes-pass.spec index d6874b2..aed59f2 100644 --- a/qubes-pass.spec +++ b/qubes-pass.spec @@ -3,7 +3,7 @@ %define mybuildnumber %{?build_number}%{?!build_number:1} Name: qubes-pass -Version: 0.0.26 +Version: 0.0.27 Release: %{mybuildnumber}%{?dist} Summary: Inter-VM pass password management for Qubes OS AppVMs and StandaloneVMs BuildArch: noarch