2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-11-10 23:31:10 +00:00

fix protocol cli

This commit is contained in:
Mathias Buus 2015-04-04 21:28:06 -07:00
parent 7464ba56a3
commit 46b0596eb8

6
cli.js
View File

@ -5,11 +5,11 @@ var packager = require('./')
args.dir = args._[0] args.dir = args._[0]
args.name = args._[1] args.name = args._[1]
var protocolSchemes = args.protocol var protocolSchemes = [].concat(args.protocol || [])
var protocolNames = args['protocol-names'] var protocolNames = [].concat(args['protocol-name'] || [])
if (protocolSchemes && protocolNames && protocolNames.length === protocolSchemes.length) { if (protocolSchemes && protocolNames && protocolNames.length === protocolSchemes.length) {
args.protocol = protocolSchemes.map(function (scheme, i) { args.protocols = protocolSchemes.map(function (scheme, i) {
return {schemes: [scheme], name: protocolNames[i]} return {schemes: [scheme], name: protocolNames[i]}
}) })
} }