Skip to content

Commit

Permalink
Moves the .fail() to the libraries/index.js instead of the binaries/l…
Browse files Browse the repository at this point in the history
…10ns
  • Loading branch information
Ricardo Machado committed Apr 12, 2016
1 parent 1e7c05c commit 61b9975
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 0 additions & 12 deletions binaries/l10ns
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,6 @@ commands
cli.initialize()
.then(function() {
cli.compile();
})
.fail(function(error) {
if (error) {
if(commands.stack && error && error.stack) {
console.log(error.stack);
}

if(error && error.message) {
console.log(error.message);
}
process.exit(1);
}
});
});

Expand Down
14 changes: 13 additions & 1 deletion libraries/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,19 @@ CLI.prototype.search = function(q) {
*/

CLI.prototype.compile = function() {
this.compiler.run();
this.compiler.run()
.fail(function(error) {
if (error) {
if(commands.stack && error && error.stack) {
console.log(error.stack);
}

if(error && error.message) {
console.log(error.message);
}
process.exit(1);
}
});
};

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "l10ns",
"description": "Internationalization workflow and formatting",
"version": "2.3.0",
"version": "2.3.1",
"homepage": "https://github.com/mAiNiNfEcTiOn/l10ns",
"author": {
"name": "Tingan Ho",
Expand Down

0 comments on commit 61b9975

Please sign in to comment.