mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-31 08:25:36 +00:00
Support --output option
This commit is contained in:
parent
7ea4ef84b4
commit
2b5d95af3a
@ -13,14 +13,14 @@ exports.download = (id) ->
|
||||
wifiKey: resin.cli.getArgument('wifiKey')
|
||||
|
||||
fileName = resin.os.generateCacheName(id, params)
|
||||
outputFile = path.join(resin.config.osDirectory, fileName)
|
||||
outputFile = resin.cli.getArgument('output') or path.join(resin.config.osDirectory, fileName)
|
||||
|
||||
async.waterfall [
|
||||
|
||||
(callback) ->
|
||||
|
||||
# We need to ensure this directory exists
|
||||
mkdirp resin.config.osDirectory, (error) ->
|
||||
mkdirp path.dirname(outputFile), (error) ->
|
||||
return callback(error)
|
||||
|
||||
(callback) ->
|
||||
|
@ -50,6 +50,10 @@ resin.cli.addOption
|
||||
option: '-k, --wifi-key <wifiKey>'
|
||||
description: 'wifi key, if network is wifi'
|
||||
|
||||
resin.cli.addOption
|
||||
option: '-o, --output <output>'
|
||||
description: 'output file'
|
||||
|
||||
# ---------- Auth Module ----------
|
||||
resin.cli.addCommand
|
||||
command: 'login [username:password]'
|
||||
|
Loading…
x
Reference in New Issue
Block a user