diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c index 40588759a2..627fab0ad0 100644 --- a/ShellPkg/Application/Shell/Shell.c +++ b/ShellPkg/Application/Shell/Shell.c @@ -2392,6 +2392,7 @@ SetupAndRunCommandOrFile( // Now run the command, script, or application // if (!EFI_ERROR(Status)) { + TrimSpaces(&CmdLine); Status = RunCommandOrFile( Type, CmdLine,