diff --git a/main.c b/main.c index e044123..ea040ab 100644 --- a/main.c +++ b/main.c @@ -239,7 +239,8 @@ main(int argc, char **argv) #endif /* HAVE_MTRACE */ #endif /* HAVE_MCHECK_H */ - myname = gawk_name(argv[0]); + if (!(myname = getenv("GAWK_ERROR_NAME")) || !*myname) + myname = gawk_name(argv[0]); os_arg_fixup(&argc, &argv); /* emulate redirection, expand wildcards */ if (argc < 2)