Fix revng --help displaying absolute paths

This commit is contained in:
Giacomo Vercesi
2022-04-29 10:29:32 +02:00
parent e6f6010cfd
commit f536d62340
+3 -1
View File
@@ -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):