Skip to content

Commit ab6db6a

Browse files
committed
FIX: check the correct env-var: QLEVER_OVERRIDE_DISABLE_UI not QLEVER_IS_RUNNING_IN_CONTAINER
1 parent 865b0fa commit ab6db6a

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

‎src/qlever/commands/ui.py‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,8 @@ def additional_arguments(self, subparser) -> None:
9393

9494
def execute(self, args) -> bool:
9595
# If QLEVER_OVERRIDE_DISABLE_UI is set, this command is disabled.
96-
qlever_is_running_in_container = environ.get(
97-
"QLEVER_IS_RUNNING_IN_CONTAINER"
98-
)
99-
if qlever_is_running_in_container:
96+
qlever_override_disable_ui = environ.get("QLEVER_OVERRIDE_DISABLE_UI")
97+
if qlever_override_disable_ui:
10098
log.error(
10199
"The environment variable `QLEVER_OVERRIDE_DISABLE_UI` is set, "
102100
"therefore `qlever ui` is not available (it should not be called "
@@ -158,7 +156,7 @@ def execute(self, args) -> bool:
158156
else:
159157
commands_to_show.append(set_config_cmd)
160158
self.show("\n".join(commands_to_show), only_show=args.show)
161-
if qlever_is_running_in_container:
159+
if qlever_override_disable_ui:
162160
return False
163161
if args.show:
164162
return True
@@ -198,8 +196,7 @@ def execute(self, args) -> bool:
198196
run_command(get_db_cmd)
199197
except Exception as e:
200198
log.error(
201-
f"Failed to get {ui_db_file} from {args.ui_image} "
202-
f"({e})"
199+
f"Failed to get {ui_db_file} from {args.ui_image} ({e})"
203200
)
204201
return False
205202

0 commit comments

Comments
 (0)