summaryrefslogtreecommitdiff
path: root/tools/eos-application-manifest/eos-application-manifest.in
diff options
context:
space:
mode:
authorRory MacQueen <rorymacqueen@gmail.com>2013-12-10 14:25:41 -0800
committerRory MacQueen <rorymacqueen@gmail.com>2013-12-10 14:25:41 -0800
commit15c4c63ba41e4848d015ac3e864f26b9c30dbaa4 (patch)
tree93cca605dbcb0902dcfeafcfdcf837a39d8bdde5 /tools/eos-application-manifest/eos-application-manifest.in
parentc26763c821ff2b2c74f6529081b15b73fa4a5f86 (diff)
parentb60363fe96b449d4f929b851163ed59adbf10536 (diff)
Merge pull request #434 from endlessm/issues/432
Use System.exit() and System.programInvocationName
Diffstat (limited to 'tools/eos-application-manifest/eos-application-manifest.in')
-rw-r--r--tools/eos-application-manifest/eos-application-manifest.in11
1 files changed, 3 insertions, 8 deletions
diff --git a/tools/eos-application-manifest/eos-application-manifest.in b/tools/eos-application-manifest/eos-application-manifest.in
index 382693b..caf70e2 100644
--- a/tools/eos-application-manifest/eos-application-manifest.in
+++ b/tools/eos-application-manifest/eos-application-manifest.in
@@ -5,8 +5,6 @@ const Format = imports.format;
const System = imports.system;
String.prototype.format = Format.format;
-// monkeypatch System.programInvocationName which is not in this version of GJS
-System.programInvocationName = 'eos-application-manifest';
// Other constants, available from subcommands' code
const commandSearchPath = "@libexecdir@/eos-application-manifest/commands";
@@ -21,8 +19,7 @@ if (ARGV.length === 0) {
// automatically invoke "help" command with no arguments
const Help = imports.help;
Help.execute([]);
- // System.exit(1); broken, bugzilla.gnome.org #703826
- throw new Error();
+ System.exit(1);
}
let command_name = ARGV.shift();
@@ -34,14 +31,12 @@ try {
let program_name = System.programInvocationName;
printerr("%s: '%s' is not a valid command name. See %s help.".format(
program_name, command_name, program_name));
- // System.exit(1); broken
- throw new Error();
+ System.exit(1);
}
}
try {
command.execute(ARGV);
} catch (e) {
printerr('%s: %s'.format(System.programInvocationName, e.message));
- // System.exit(1); broken
- throw e;
+ System.exit(1);
}