1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00

support TREZOR_PATH environment variable for selecting default path (#221)

This commit is contained in:
matejcik 2018-02-28 18:04:33 +01:00 committed by Pavol Rusnak
parent 2d3e890c6b
commit 8404bef6e3

View File

@ -25,6 +25,7 @@ import binascii
import click
import functools
import json
import os
import sys
from trezorlib.client import TrezorClient, TrezorClientVerbose, CallException
@ -63,8 +64,8 @@ CHOICE_OUTPUT_SCRIPT_TYPE = ChoiceType({
})
@click.group()
@click.option('-p', '--path', help='Select device by specific path.')
@click.group(context_settings={'max_content_width': 400})
@click.option('-p', '--path', help='Select device by specific path.', default=os.environ.get('TREZOR_PATH'))
@click.option('-v', '--verbose', is_flag=True, help='Show communication messages.')
@click.option('-j', '--json', 'is_json', is_flag=True, help='Print result as JSON object')
@click.pass_context