Verified Commit 3e478c31 authored by Adrian DC's avatar Adrian DC
Browse files

fix(git_dashboard_panel): show 'fzf' error logs in console output

Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent ac30b59d
Loading
Loading
Loading
Loading
+1
Changes for src/tools/git_dashboard_panel.py: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -246,6 +246,7 @@ def run_fzf(
            '--style',
            'full',
        ],
        silent=False,
        stderr=False,
    )

+6 −2
Changes for src/tools/tools.py: 6 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ class Tools:
    @staticmethod
    def run_output(
        command: list[str],
        silent: bool = True,
        stderr: bool = True,
    ) -> str:
        try:
@@ -51,11 +52,14 @@ class Tools:
                text=True,
                check=True,
                stdout=PIPE,
                stderr=PIPE if stderr else DEVNULL,
                stderr=PIPE if stderr else DEVNULL if silent else None,
            )
            return str(result.stdout.strip())
        except CalledProcessError as error:
            if stderr and error.stderr:
            if error.stderr:
                if not silent:
                    print(error.stderr.strip())
                if stderr:
                    return str(error.stderr.strip())
            return ''