clan: remove flatpak check
This check logs, if the cli is started inside a flatpak environment.
This commit is contained in:
@@ -18,7 +18,6 @@ from . import (
|
|||||||
config,
|
config,
|
||||||
facts,
|
facts,
|
||||||
flash,
|
flash,
|
||||||
flatpak,
|
|
||||||
history,
|
history,
|
||||||
machines,
|
machines,
|
||||||
secrets,
|
secrets,
|
||||||
@@ -408,8 +407,6 @@ def main() -> None:
|
|||||||
if getattr(args, "debug", False):
|
if getattr(args, "debug", False):
|
||||||
setup_logging(logging.DEBUG, root_log_name=__name__.split(".")[0])
|
setup_logging(logging.DEBUG, root_log_name=__name__.split(".")[0])
|
||||||
log.debug("Debug log activated")
|
log.debug("Debug log activated")
|
||||||
if flatpak.is_flatpak():
|
|
||||||
log.debug("Running inside a flatpak sandbox")
|
|
||||||
else:
|
else:
|
||||||
setup_logging(logging.INFO, root_log_name=__name__.split(".")[0])
|
setup_logging(logging.INFO, root_log_name=__name__.split(".")[0])
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
def is_flatpak() -> bool:
|
|
||||||
"""Check if the current process is running inside a flatpak sandbox."""
|
|
||||||
# FLATPAK_ID environment variable check
|
|
||||||
flatpak_env = "FLATPAK_ID" in os.environ
|
|
||||||
|
|
||||||
flatpak_file = False
|
|
||||||
try:
|
|
||||||
with open("/.flatpak-info"):
|
|
||||||
flatpak_file = True
|
|
||||||
except FileNotFoundError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
return flatpak_env and flatpak_file
|
|
||||||
Reference in New Issue
Block a user