]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Application/Shell/ShellProtocol.c
ShellPkg/ShellProtocol: Return error code while fail parsing cmd-line
[mirror_edk2.git] / ShellPkg / Application / Shell / ShellProtocol.c
index 5e529b6568a9fcfdea2057efc67b54bd9bda817c..f0362a42d893ea24daf7e32989841a1589ee0ec6 100644 (file)
@@ -1497,7 +1497,10 @@ InternalShellExecuteDevicePath(
     ShellParamsProtocol.StdOut  = ShellInfoObject.NewShellParametersProtocol->StdOut;\r
     ShellParamsProtocol.StdErr  = ShellInfoObject.NewShellParametersProtocol->StdErr;\r
     Status = UpdateArgcArgv(&ShellParamsProtocol, NewCmdLine, Efi_Application, NULL, NULL);\r
-    ASSERT_EFI_ERROR(Status);\r
+    if (EFI_ERROR (Status)) {\r
+      goto UnloadImage;\r
+    }\r
+\r
     //\r
     // Replace Argv[0] with the full path of the binary we're executing:\r
     // If the command line was "foo", the binary might be called "foo.efi".\r