diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2011-09-21 14:42:25 +1000 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2011-09-21 14:42:25 +1000 |
commit | 6434a6ee8be6b18fee6c94972e9c702ebdcbf621 (patch) | |
tree | aff1c17680355f56dd2205fe3f130e7950994740 /src/lightdm.c | |
parent | ae51d0a7afa992da654d75617d9b0adf530a6848 (diff) | |
download | lightdm-6434a6ee8be6b18fee6c94972e9c702ebdcbf621.tar.gz |
Allow --version to work without root access
Diffstat (limited to 'src/lightdm.c')
-rw-r--r-- | src/lightdm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lightdm.c b/src/lightdm.c index 90f05a78..769efa82 100644 --- a/src/lightdm.c +++ b/src/lightdm.c @@ -796,6 +796,13 @@ main (int argc, char **argv) } g_clear_error (&error); + if (show_version) + { + /* NOTE: Is not translated so can be easily parsed */ + g_printerr ("lightdm %s\n", VERSION); + return EXIT_SUCCESS; + } + if (config_path) { config_dir = g_path_get_basename (config_path); @@ -837,13 +844,6 @@ main (int argc, char **argv) return EXIT_FAILURE; } - if (show_version) - { - /* NOTE: Is not translated so can be easily parsed */ - g_printerr ("lightdm %s\n", VERSION); - return EXIT_SUCCESS; - } - /* Write PID file */ pid_file = fopen (pid_path, "w"); if (pid_file) |