Bug 1182395 - Don't error out when -p is not given an argument in RemoteCommandLine. r=bsmedberg, a=lmandel
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 15 Jul 2015 10:31:59 +0900
changeset 270374 c4f8219f3ea30a80e5adcd3ec4b4c759ee708f34
parent 270373 5fc78d653b9b1750dc3358cc34d90e2b3d465a9d
child 270375 e48ae21ed4146fe59aedfaceea134f2bb0824bf4
push id8232
push usercbook@mozilla.com
push dateWed, 22 Jul 2015 11:16:49 +0000
treeherdermozilla-aurora@c4f8219f3ea3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, lmandel
bugs1182395
milestone41.0a2
Bug 1182395 - Don't error out when -p is not given an argument in RemoteCommandLine. r=bsmedberg, a=lmandel Leave it to the normal command line handling to handle the situation and display the profile manager.
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -1783,18 +1783,18 @@ RemoteCommandLine(const char* aDesktopSt
 
   const char *profile = 0;
   nsAutoCString program(gAppData->remotingName);
   ToLowerCase(program);
   const char *username = getenv("LOGNAME");
 
   ar = CheckArg("p", false, &profile, false);
   if (ar == ARG_BAD) {
-    PR_fprintf(PR_STDERR, "Error: argument -p requires a profile name\n");
-    return REMOTE_ARG_BAD;
+    // Leave it to the normal command line handling to handle this situation.
+    return REMOTE_NOT_FOUND;
   }
 
   const char *temp = nullptr;
   ar = CheckArg("a", true, &temp);
   if (ar == ARG_BAD) {
     PR_fprintf(PR_STDERR, "Error: argument -a requires an application name\n");
     return REMOTE_ARG_BAD;
   } else if (ar == ARG_FOUND) {