diff --git a/src/python/jw/pkg/cmds/projects/CmdGetAuthInfo.py b/src/python/jw/pkg/cmds/projects/CmdGetAuthInfo.py index eaae7d78..489b4f95 100644 --- a/src/python/jw/pkg/cmds/projects/CmdGetAuthInfo.py +++ b/src/python/jw/pkg/cmds/projects/CmdGetAuthInfo.py @@ -16,10 +16,16 @@ class CmdGetAuthInfo(Cmd): # export def add_arguments(self, parser: ArgumentParser) -> None: super().add_arguments(parser) - parser.add_argument('--only-values', help='Don\'t prefix values by "="', action='store_true', default=False) - parser.add_argument('--username', help='Show user name', action='store_true', default=False) - parser.add_argument('--password', help='Show password', action='store_true', default=False) - parser.add_argument('--remote-base', help='Show remote base URL', action='store_true', default=False) + parser.add_argument('--only-values', default=False, action='store_true', + help='Don\'t prefix values by "="') + parser.add_argument('--username', default=False, action='store_true', + help='Show user name') + parser.add_argument('--password', default=False, action='store_true', + help='Show password') + parser.add_argument('--remote-owner-base', default=False, action='store_true', + help='Show remote base URL for owner jw-pkg was cloned from') + parser.add_argument('--remote-base', default=False, action='store_true', + help='Show remote base URL') async def _run(self, args: Namespace) -> None: keys = ['username', 'password'] @@ -40,7 +46,9 @@ class CmdGetAuthInfo(Cmd): # export base = parsed.geturl() base = re.sub(r'/jw-pkg', '', base) base = re.sub(r'/proj$', '', base) - result['remote_base'] = base + base = re.sub(r'/proj$', '', base) + result['remote_owner_base'] = base + result['remote_base'] = os.path.dirname(base) break # --- Print results