Skip to content

Commit 9047ef5

Browse files
committed
Added --server flag that drives the base_url given to the FerryCLI constructor
1 parent 3898be2 commit 9047ef5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ferry_cli/__main__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,9 @@ def main() -> None:
621621
try:
622622
auth_args, other_args = get_auth_args()
623623
ferry_cli = FerryCLI(
624-
config_path=config_path, authorizer=set_auth_from_args(auth_args)
624+
config_path=config_path,
625+
authorizer=set_auth_from_args(auth_args),
626+
base_url=auth_args.server,
625627
)
626628
if auth_args.update or not os.path.exists(f"{CONFIG_DIR}/swagger.json"):
627629
if auth_args.debug_level != DebugLevel.QUIET:

ferry_cli/helpers/auth.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,11 @@ def get_auth_parser() -> "FerryParser":
213213
help="Get Ferry CLI support emails",
214214
action=request_project_info("email"),
215215
)
216+
auth_parser.add_argument(
217+
"-s",
218+
"--server",
219+
help="Server URL to use instead of configuration file api.base_url value",
220+
)
216221
auth_parser.add_argument(
217222
"--version",
218223
nargs=0,

0 commit comments

Comments
 (0)