Skip to content

Commit dd0dee3

Browse files
committed
unix: Properly print script filename in case of error.
1 parent 8bf8404 commit dd0dee3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unix/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ int main(int argc, char **argv) {
355355
} else {
356356
char *basedir = realpath(argv[a], NULL);
357357
if (basedir == NULL) {
358-
fprintf(stderr, "%s: can't open file '%s': [Errno %d] ", argv[0], argv[1], errno);
358+
fprintf(stderr, "%s: can't open file '%s': [Errno %d] ", argv[0], argv[a], errno);
359359
perror("");
360360
// CPython exits with 2 in such case
361361
ret = 2;

0 commit comments

Comments
 (0)