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