From f536d623404d9b2a8d650f201d090f69e2d33449 Mon Sep 17 00:00:00 2001 From: Giacomo Vercesi Date: Fri, 29 Apr 2022 10:29:32 +0200 Subject: [PATCH] Fix revng --help displaying absolute paths --- python/revng/cli/commands_registry.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/revng/cli/commands_registry.py b/python/revng/cli/commands_registry.py index 019a8673c..3d1a2e127 100644 --- a/python/revng/cli/commands_registry.py +++ b/python/revng/cli/commands_registry.py @@ -4,6 +4,7 @@ import argparse import dataclasses +import os import sys from typing import Tuple @@ -26,7 +27,8 @@ class Command: class ExternalCommand(Command): def __init__(self, command, path): - super().__init__(command, f"""see {sys.argv[0]} {" ".join(command)} --help""", False) + executable_name = os.path.basename(sys.argv[0]) + super().__init__(command, f"""see {executable_name} {" ".join(command)} --help""", False) self.path = path def register_arguments(self, parser):