[PATCH v2] cmd: Do not change errorlevel when setting environment variables

Dmitry Timoshkov dmitry at baikal.ru
Mon May 31 01:49:22 CDT 2021


Florian Eder <others.meder at gmail.com> wrote:

> diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
> index 502694ffc46..0e16ffda713 100644
> --- a/programs/cmd/builtins.c
> +++ b/programs/cmd/builtins.c
> @@ -4218,6 +4218,7 @@ void WCMD_setshow_env (WCHAR *s) {
>      if ((!status) & (gle == ERROR_ENVVAR_NOT_FOUND)) {
>        errorlevel = 1;
>      } else if (!status) WCMD_print_error();
> +    else if (interactive) return;
>      else errorlevel = 0;
>    }
>  }

Probably it would look more naturally with
else if (!interactive)
    errorlevel = 0;
instead of abruptly doing a return.

-- 
Dmitry.



More information about the wine-devel mailing list