1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-05-06 07:36:20 +02:00

52596: metafy interpreter name for error message

This commit is contained in:
Bart Schaefer 2024-02-24 20:45:29 -08:00
parent 4c0ebc155e
commit 69c0c646bb
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,7 @@
2024-02-24 Bart Schaefer <schaefer@zsh.org>
* 52596: Src/exec.c: metafy interpreter name for error message
* Stephane: 52591: Src/builtin.c: printf builtin must pass
metafied strings to math evaluation

View File

@ -551,7 +551,7 @@ zexecve(char *pth, char **argv, char **newenvp)
break;
if (t0 == ct)
zerr("%s: bad interpreter: %s: %e", pth,
execvebuf + 2, eno);
metafy(execvebuf + 2, -1, META_NOALLOC), eno);
else {
while (inblank(execvebuf[t0]))
execvebuf[t0--] = '\0';
@ -574,8 +574,8 @@ zexecve(char *pth, char **argv, char **newenvp)
execve(pprog, argv - 2, newenvp);
}
}
zerr("%s: bad interpreter: %s: %e", pth, ptr2,
eno);
zerr("%s: bad interpreter: %s: %e", pth,
metafy(ptr2, -1, META_NOALLOC), eno);
} else if (*ptr) {
*ptr = '\0';
argv[-2] = ptr2;