From 2bde2ddfbf56277fbf93af96fe3a88cb042b6696 Mon Sep 17 00:00:00 2001 From: Soramane <61896496+soramanew@users.noreply.github.com> Date: Fri, 25 Jul 2025 11:41:58 +1000 Subject: shell: fix log when no log rules also fix nix devshell --- flake.nix | 7 +------ src/caelestia/subcommands/shell.py | 5 ++++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index f172ce3..abc9583 100644 --- a/flake.nix +++ b/flake.nix @@ -40,12 +40,7 @@ devShells = forAllSystems (pkgs: { default = pkgs.mkShellNoCC { - inputsFrom = [self.packages.${pkgs.system}.caelestia-cli]; - packages = [ - (pkgs.writeShellScriptBin "caelestia" '' - cd src && python -m caelestia "$@" - '') - ]; + packages = [(self.packages.${pkgs.system}.caelestia-cli.override {withShell = true;})]; }; }); }; diff --git a/src/caelestia/subcommands/shell.py b/src/caelestia/subcommands/shell.py index 68a6821..06f3b45 100644 --- a/src/caelestia/subcommands/shell.py +++ b/src/caelestia/subcommands/shell.py @@ -44,7 +44,10 @@ class Command: print(self.shell("ipc", "show"), end="") def print_log(self) -> None: - log = self.shell("log", "-r", self.args.log_rules) + if self.args.log_rules: + log = self.shell("log", "-r", self.args.log_rules) + else: + log = self.shell("log") # FIXME: remove when logging rules are added/warning is removed for line in log.splitlines(): if self.filter_log(line): -- cgit v1.2.3-freya