Commit aee397a3 authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

cmd: Output error messages to stderr instead of stdout where appropriate.

parent 40c783fc
...@@ -1124,7 +1124,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { ...@@ -1124,7 +1124,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) {
/* Process the input file */ /* Process the input file */
if (input == INVALID_HANDLE_VALUE) { if (input == INVALID_HANDLE_VALUE) {
WCMD_print_error (); WCMD_print_error ();
WCMD_output (WCMD_LoadMessage(WCMD_READFAIL), item); WCMD_output_stderr(WCMD_LoadMessage(WCMD_READFAIL), item);
errorlevel = 1; errorlevel = 1;
return; /* FOR loop aborts at first failure here */ return; /* FOR loop aborts at first failure here */
...@@ -1539,7 +1539,7 @@ void WCMD_if (WCHAR *p, CMD_LIST **cmdList) { ...@@ -1539,7 +1539,7 @@ void WCMD_if (WCHAR *p, CMD_LIST **cmdList) {
WCMD_parameter(s, 1, &command, NULL); WCMD_parameter(s, 1, &command, NULL);
} }
else { else {
WCMD_output (WCMD_LoadMessage(WCMD_SYNTAXERR)); WCMD_output_stderr(WCMD_LoadMessage(WCMD_SYNTAXERR));
return; return;
} }
......
...@@ -1055,7 +1055,7 @@ void WCMD_run_program (WCHAR *command, int called) { ...@@ -1055,7 +1055,7 @@ void WCMD_run_program (WCHAR *command, int called) {
if (strchrW(param1, '.') != NULL) extensionsupplied = TRUE; if (strchrW(param1, '.') != NULL) extensionsupplied = TRUE;
if (strlenW(param1) >= MAX_PATH) if (strlenW(param1) >= MAX_PATH)
{ {
WCMD_output_asis(WCMD_LoadMessage(WCMD_LINETOOLONG)); WCMD_output_asis_stderr(WCMD_LoadMessage(WCMD_LINETOOLONG));
return; return;
} }
...@@ -1836,9 +1836,9 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, ...@@ -1836,9 +1836,9 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output,
/* Handle truncated input - issue warning */ /* Handle truncated input - issue warning */
if (strlenW(extraSpace) == MAXSTRING -1) { if (strlenW(extraSpace) == MAXSTRING -1) {
WCMD_output_asis(WCMD_LoadMessage(WCMD_TRUNCATEDLINE)); WCMD_output_asis_stderr(WCMD_LoadMessage(WCMD_TRUNCATEDLINE));
WCMD_output_asis(extraSpace); WCMD_output_asis_stderr(extraSpace);
WCMD_output_asis(newline); WCMD_output_asis_stderr(newline);
} }
/* Replace env vars if in a batch context */ /* Replace env vars if in a batch context */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment