Get rid of automatic cache name generation logic

This commit is contained in:
Juan Cruz Viotti 2015-03-09 12:38:37 -04:00
parent 4c35badcad
commit 1bb798a8b8
2 changed files with 4 additions and 9 deletions

View File

@ -32,22 +32,19 @@
signature: 'output',
parameter: 'output',
description: 'output file',
alias: 'o'
alias: 'o',
required: 'You need to specify an output file'
}
],
permission: 'user',
action: function(params, options, done) {
var fileName, osParams;
var osParams;
osParams = {
network: options.network,
wifiSsid: options.ssid,
wifiKey: options.key,
appId: params.id
};
fileName = resin.models.os.generateCacheName(osParams);
if (options.output == null) {
options.output = path.join(resin.settings.get('directories.os'), fileName);
}
return async.waterfall([
function(callback) {
return mkdirp(path.dirname(options.output), _.unary(callback));

View File

@ -42,6 +42,7 @@ exports.download =
parameter: 'output'
description: 'output file'
alias: 'o'
required: 'You need to specify an output file'
}
]
permission: 'user'
@ -52,9 +53,6 @@ exports.download =
wifiKey: options.key
appId: params.id
fileName = resin.models.os.generateCacheName(osParams)
options.output ?= path.join(resin.settings.get('directories.os'), fileName)
async.waterfall [
(callback) ->