From: Eric Pouech <epouech(a)codeweavers.com> Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- programs/cmd/tests/test_builtins.cmd.exp | 2 +- programs/cmd/wcmdmain.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index b34c5b764da..691454584f9 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -1822,7 +1822,7 @@ bar p1 echo bar cp1 echo bar cp2 echo @todo_wine(a)cp3 -(a)todo_wine@bar b1 echo +bar b1 echo @todo_wine(a)bar b2 echo @todo_wine(a)bar b3 echo @todo_wine(a)bar cb1 echo diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 19ccd52f82f..8a7b5cfbdaa 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -1763,6 +1763,7 @@ static RETURN_CODE execute_single_command(const WCHAR *command) /* Move copy of the command onto the heap so it can be expanded */ cmd = xalloc(MAXSTRING * sizeof(WCHAR)); lstrcpyW(cmd, command); + handleExpansion(cmd, TRUE); TRACE("Command: '%s'\n", wine_dbgstr_w(cmd)); @@ -1777,8 +1778,6 @@ static RETURN_CODE execute_single_command(const WCHAR *command) } parms_start = WCMD_skip_leading_spaces(&cmd[count]); - handleExpansion(cmd, TRUE); - /* * Changing default drive has to be handled as a special case, anything * else if it exists after whitespace is ignored -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6475