From cc3fbff888d219e5041213bbef0be7e4e361a74c Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Thu, 9 Oct 2014 22:31:15 -0700 Subject: [PATCH] Clean up error handling for `meteor build` tarball creation. Write errors to `Console.stderr`, and exit 1 instead of going on to do the mobile builds (if any) and exiting 0. --- tools/commands.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/commands.js b/tools/commands.js index eeea60d3e8..ed3fc1d4a0 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -737,8 +737,10 @@ var buildCommand = function (options) { var outputTar = path.join(outputPath, appName + '.tar.gz'); files.createTarball(path.join(buildDir, 'bundle'), outputTar); } catch (err) { - console.log(JSON.stringify(err)); - Console.stderr.write("Couldn't create tarball\n"); + Console.stderr.write("Errors during tarball creation:\n"); + Console.stderr.write(err.message); + files.rm_recursive(buildDir); + return 1; } }