Closed Bug 289631 Opened 20 years ago Closed 14 years ago

-profile ./noexist returns silently to the shell prompt

Categories

(Toolkit :: Startup and Profile System, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- -

People

(Reporter: djcater+bugzilla, Unassigned)

References

Details

When launching Firefox from a terminal using the -profile parameter, if the
profile pointed to does not exist, Firefox is not started and it returns to the
shell prompt without printing any messages to the terminal.

Steps to reproduce:

1. Type this into a terminal: 
/$PATH_TO_FIREFOX/firefox -profile /noexist/
(Assuming you don't have a Firefox profile named noexist/ in your root folder!)

Actual Results:

Firefox didn't start. Shell prompt reappeared. No messages printed.

Expected Results:

A message stating that the pointed to profile does not exist should have been
printed to the terminal.

This occurs using the latest build from the ocean-trunk/ tinderbox. I noticed it
when I spelled the path to the profile I wanted to use incorrectly, and because
I was testing a few things it took me a while to work out why Firefox didn't
start. A simple error message would have solved this problem.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b2) Gecko/20050408 Firefox/1.0+

Component > Cmd-line Features

Oops, this is Cmd-line Features, sorry! (Build Config is one above Cmd-line
Features, bad mouse, blah blah grumble grumble...)

UA String at top of this comment, forgot to add.
Component: Build Config → Cmd-line Features
Yeah, this bug has annoyed me too.  It should be fairly trivial to fix.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → darin
Component: Cmd-line Features → XRE Startup
Product: Core → Toolkit
Version: Trunk → unspecified
Assignee: darin → nobody
QA Contact: build-config → xre.startup
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
This bug annoyed me again today.

I think the relevant code is in the SelectProfile function here: http://mxr.mozilla.org/mozilla-central/source/toolkit/xre/nsAppRunner.cpp#1956

1956   ar = CheckArg("profile", PR_TRUE, &arg);
1957   if (ar == ARG_BAD) {
1958     PR_fprintf(PR_STDERR, "Error: argument -profile requires a path\n");
1959     return NS_ERROR_FAILURE;
1960   }
1961   if (ar) {
1962     nsCOMPtr<nsILocalFile> lf;
1963     rv = XRE_GetFileFromPath(arg, getter_AddRefs(lf));
1964     NS_ENSURE_SUCCESS(rv, rv);

which is called from XRE_main here: http://mxr.mozilla.org/mozilla-central/source/toolkit/xre/nsAppRunner.cpp#3129

3129     rv = SelectProfile(getter_AddRefs(profileLock), nativeApp, &startOffline,
3130                        &profileName);
3131     if (rv == NS_ERROR_LAUNCHED_CHILD_PROCESS ||
3132         rv == NS_ERROR_ABORT) return 0;
3133     if (NS_FAILED(rv)) return 1;
blocking2.0: --- → ?
Flags: wanted1.9.2?
I would never block on this, it's not a user-facing feature.
blocking2.0: ? → -
Fixed by bug 237128.
Status: NEW → RESOLVED
Closed: 14 years ago
Depends on: 237128
Flags: wanted1.9.2?
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.