Skip to content

Commit

Permalink
[WIP] Zxp-provider can return a cmd/a path to ZXPSignCmd tool.
Browse files Browse the repository at this point in the history
- Cut and pass correctly command and arguments to spawn command
- Otherwise works like before
  • Loading branch information
Emilie committed Jul 25, 2019
1 parent 24280ab commit a35dcb7
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions tasks/lib/zxp.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,24 @@ module.exports = function (grunt)
grunt.fatal('Invalid input folder.');
}

var spawn_options = {
cmd: zxp_path,
args: [
var zxp_path_arr = zxp_path.split(" ");
var sign_args = [
'-sign',
input_folder,
output_file,
options['package'].certificate.file,
options['package'].certificate.password,
],
];

if (zxp_path_arr.length > 1) {
for (var i = 1; i < zxp_path_arr.length; i++) {
sign_args.unshift(zxp_path_arr[i]);
}
}

var spawn_options = {
cmd: zxp_path_arr[0],
args: sign_args
},
errors = [];

Expand Down

0 comments on commit a35dcb7

Please sign in to comment.