mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-11 15:33:06 +00:00
17 lines
303 B
CoffeeScript
17 lines
303 B
CoffeeScript
fsUtils = require('../fs-utils/fs-utils')
|
|
|
|
prefix = null
|
|
|
|
exports.get = ->
|
|
return prefix
|
|
|
|
exports.set = (newPrefix, callback) ->
|
|
if not fsUtils.isValidPath(newPrefix)
|
|
return callback?(new Error('Invalid path'))
|
|
|
|
prefix = newPrefix
|
|
return callback?(null, prefix)
|
|
|
|
exports.clear = ->
|
|
prefix = null
|