提交 ec526e29 编写于 作者: P pilipala195 提交者: Gitee

Try to use the configured root path when hb set

上级 ad979fd9
......@@ -20,6 +20,8 @@ import os
from hb.common.config import Config
from hb.common.utils import get_input
from hb.common.utils import OHOSException
from hb.common.utils import hb_info
from hb.common.product import Product
from hb.common.device import Device
......@@ -47,7 +49,11 @@ def exec_command(args):
def set_root_path(root_path=None):
config = Config()
if root_path is None:
root_path = get_input('[OHOS INFO] Input code path: ')
try:
hb_info(f'hb root path: {config.root_path}')
return 0
except OHOSException:
root_path = get_input('[OHOS INFO] Input code path: ')
config.root_path = root_path
return 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册