From ca6af870d3acdfe11d1a9e65bc32f461cb5cef99 Mon Sep 17 00:00:00 2001 From: Ivo Georgiev Date: Mon, 11 May 2015 18:22:10 +0300 Subject: [PATCH] Validate the --arch argument --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index d8e2b8a..a4473f3 100644 --- a/index.js +++ b/index.js @@ -18,6 +18,12 @@ module.exports = function packager (opts, cb) { if (!platform || !arch || !version) cb(new Error('Must specify platform, arch and version')) + switch (arch) { + case 'ia32': break + case 'x64': break + default: cb(new Error('Unsupported arch')) + } + switch (platform) { case 'darwin': packager = mac; break case 'linux': packager = linux; break