On 28/08/17 21:17, Jim Meyering wrote: > On Mon, Aug 28, 2017 at 8:55 PM, Pádraig Brady <p...@draigbrady.com> wrote: >> I'll push the attached shortly. >> This supports -C and also requires specifying a command >> when specifying -C, as otherwise you get confusing >> output and no error with `env --chdir command` which would >> just print the environment with the previous version. >> It's of no functional value to print the env while >> also changing dir as far as I can see. > > Thanks for working on that. Nits in env.c: > > + if (opt_nul_terminate_output && program_specified) > { > + error (0, errno, _("cannot specify --null (-0) with command")); > + usage (EXIT_CANCELED); > + } > + > + if (newdir && ! program_specified) > + { > + error (0, errno, _("must specify command with --chdir (-C)")); > + usage (EXIT_CANCELED); > + } > > Each of those uses of "errno" should be "0". >
nice catch. adjusted