mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-20 22:23:07 +00:00
Fix hook arguments issue
This commit is contained in:
parent
98f4dc8e19
commit
3015af3aeb
@ -3,8 +3,9 @@ messages = require('../messages/messages')
|
||||
|
||||
exports.failIfNotLoggedIn = (fn) ->
|
||||
return ->
|
||||
args = arguments
|
||||
auth.isLoggedIn (isLoggedIn) ->
|
||||
if not isLoggedIn
|
||||
throw new Error(messages.errors.loginRequired)
|
||||
|
||||
fn.apply(null, arguments)
|
||||
fn.apply(null, args)
|
||||
|
Loading…
Reference in New Issue
Block a user