env: improve whitespace warning

* src/env.c (main): Issue -S warning for any whitespace,
not just space.
This commit is contained in:
Paul Eggert committed 2021-03-26 15:17:28 -07:00
1 parent 7fc887299e
commit 5f99c7533d
1 file changed
+1 -1
+1 -1
View File
@@ -942,7 +942,7 @@ main (int argc, char **argv)
int exit_status = errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE;
error (0, errno, "%s", quote (argv[optind]));
if (exit_status == EXIT_ENOENT && strchr (argv[optind], ' '))
if (exit_status == EXIT_ENOENT && strpbrk (argv[optind], C_ISSPACE_CHARS))
error (0, 0, _("use -[v]S to pass options in shebang lines"));
return exit_status;