Fail gracefully if the user fails to supply necessary args to bmgr
Fixes bug #2755355 Change-Id: I4690756bb5077a6b4bbbfb232cd852cad43cef77
This commit is contained in:
@@ -175,6 +175,11 @@ public final class Bmgr {
|
||||
private void doTransport() {
|
||||
try {
|
||||
String which = nextArg();
|
||||
if (which == null) {
|
||||
showUsage();
|
||||
return;
|
||||
}
|
||||
|
||||
String old = mBmgr.selectBackupTransport(which);
|
||||
if (old == null) {
|
||||
System.out.println("Unknown transport '" + which
|
||||
@@ -318,6 +323,11 @@ public final class Bmgr {
|
||||
|
||||
private void doRestore() {
|
||||
String arg = nextArg();
|
||||
if (arg == null) {
|
||||
showUsage();
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg.indexOf('.') >= 0) {
|
||||
// it's a package name
|
||||
doRestorePackage(arg);
|
||||
|
||||
Reference in New Issue
Block a user