mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-18 02:39:49 +00:00
Get rid of automatic cache name generation logic
This commit is contained in:
parent
4c35badcad
commit
1bb798a8b8
@ -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));
|
||||
|
@ -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) ->
|
||||
|
Loading…
Reference in New Issue
Block a user