pactest: parse options before environment setup
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
This commit is contained in:
parent
80eca94c8e
commit
0c5e80c3b4
|
@ -82,12 +82,14 @@ def create_parser():
|
|||
tap.bail("Python versions before 2.7 are not supported.")
|
||||
sys.exit(1)
|
||||
|
||||
# instantiate env and parser objects
|
||||
root_path = tempfile.mkdtemp(prefix='pactest-')
|
||||
env = pmenv.pmenv(root=root_path)
|
||||
# parse options
|
||||
opt_parser = create_parser()
|
||||
(opts, args) = opt_parser.parse_args()
|
||||
|
||||
# instantiate env
|
||||
root_path = tempfile.mkdtemp(prefix='pactest-')
|
||||
env = pmenv.pmenv(root=root_path)
|
||||
|
||||
# add parsed options to env object
|
||||
util.verbose = opts.verbose
|
||||
env.pacman["debug"] = opts.debug
|
||||
|
|
Loading…
Reference in New Issue