From 9b8c4beb1e64579792fca7c161c9e3b0691e67d4 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 24 Nov 2025 19:42:28 -0500 Subject: When running an executable, run it with a relative instead of absolute path so it shows up more nicely in the usage --- src/tomo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tomo.c b/src/tomo.c index 97857286..66ac0ddf 100644 --- a/src/tomo.c +++ b/src/tomo.c @@ -423,7 +423,8 @@ int main(int argc, char *argv[]) { pid_t child = i == (int64_t)run_files.length - 1 ? 0 : fork(); if (child == 0) { const char *prog_args[1 + args.length + 1]; - prog_args[0] = (char *)Path$as_c_string(exe_path); + Path_t relative_exe = Path$relative_to(exe_path, Path$current_dir()); + prog_args[0] = (char *)Path$as_c_string(relative_exe); for (int64_t j = 0; j < (int64_t)args.length; j++) prog_args[j + 1] = *(const char **)(args.data + j * args.stride); prog_args[1 + args.length] = NULL; -- cgit v1.2.3