mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-04-13 06:02:57 +00:00
Namespace directories inside config.directories
This commit is contained in:
parent
62b15cce92
commit
4143b6da49
lib
@ -13,7 +13,7 @@ exports.download = (id) ->
|
||||
wifiKey: resin.cli.getArgument('wifiKey')
|
||||
|
||||
fileName = resin.os.generateCacheName(id, params)
|
||||
outputFile = resin.cli.getArgument('output') or path.join(resin.config.osDirectory, fileName)
|
||||
outputFile = resin.cli.getArgument('output') or path.join(resin.config.directories.os, fileName)
|
||||
|
||||
async.waterfall [
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
_ = require('lodash')
|
||||
path = require('path')
|
||||
|
||||
config =
|
||||
@ -11,6 +12,10 @@ config =
|
||||
dataPrefix: path.join(process.env.HOME, '.resin')
|
||||
sshKeyWidth: 43
|
||||
|
||||
directories:
|
||||
plugins: 'plugins'
|
||||
os: 'os'
|
||||
|
||||
pubnub:
|
||||
subscribe_key: 'sub-c-bbc12eba-ce4a-11e3-9782-02ee2ddab7fe'
|
||||
publish_key: 'pub-c-6cbce8db-bfd1-4fdf-a8c8-53671ae2b226'
|
||||
@ -29,7 +34,7 @@ config =
|
||||
sshKey: '/user/keys/<%= id %>'
|
||||
download: '/download'
|
||||
|
||||
config.pluginsDirectory = path.join(config.dataPrefix, 'plugins')
|
||||
config.osDirectory = path.join(config.dataPrefix, 'os')
|
||||
config.directories = _.object _.map config.directories, (value, key) ->
|
||||
return [ key, path.join(config.dataPrefix, value) ]
|
||||
|
||||
module.exports = config
|
||||
|
Loading…
x
Reference in New Issue
Block a user