OSDN Git Service

Return exit code 0 when the command run successfully
authorTony Mak <tonymak@google.com>
Wed, 7 Jun 2017 16:34:59 +0000 (17:34 +0100)
committerTony Mak <tonymak@google.com>
Thu, 8 Jun 2017 20:33:14 +0000 (20:33 +0000)
Fix: 62410589
Test: run the pm create-user command and check the exit code

Change-Id: I5bde1f886860cd8edb869ebaa8f6e5376882f03b

cmds/pm/src/com/android/commands/pm/Pm.java

index d71573f..9813cb1 100644 (file)
@@ -1033,7 +1033,7 @@ public final class Pm {
 
             if (info != null) {
                 System.out.println("Success: created user id " + info.id);
-                return 1;
+                return 0;
             } else {
                 System.err.println("Error: couldn't create User.");
                 return 1;