mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-24 07:46:39 +00:00
Fix undefined rimraf issue after update
This commit is contained in:
parent
06f6b47fd1
commit
890d672671
@ -140,7 +140,7 @@ exports.has = haltIfNoPrefix (key, callback) ->
|
||||
# resin.data.remove 'token', (error) ->
|
||||
# throw error if error?
|
||||
#
|
||||
exports.remove = haltIfNoPrefix (key, callback) ->
|
||||
exports.remove = haltIfNoPrefix (key, callback = _.noop) ->
|
||||
try
|
||||
keyPath = constructPath(key)
|
||||
catch error
|
||||
|
@ -244,3 +244,7 @@ describe 'Data:', ->
|
||||
data.remove [ 1, 2, 3 ], (error) ->
|
||||
expect(error).to.be.an.instanceof(Error)
|
||||
done()
|
||||
|
||||
it 'should not throw an error if no callback is passed', ->
|
||||
func = _.partial(data.remove, FILESYSTEM.directory.key)
|
||||
expect(func).to.not.throw(Error)
|
||||
|
Loading…
Reference in New Issue
Block a user