brainlife / cli

brainlife.io Command Line Interface (CLI)
https://brainlife.io
MIT License
2 stars 5 forks source link

Can not query the project #31

Closed skoudoro closed 6 years ago

skoudoro commented 6 years ago

When I try to query a project. I get an error. Did I do something wrong? Below more information:

(base) C:\Users\skoudoro>bl login
username:  skoudoro
password:
Successfully logged in for 23 hours, 59 minutes, 59 seconds

(base) C:\Users\skoudoro>bl project query --admin skoudoro
(node:10624) UnhandledPromiseRejectionWarning: ReferenceError: isValidObjectId is not defined
    at Object.exports.resolveProfiles (C:\Users\skoudoro\AppData\Roaming\npm\node_modules\brainlife\util.js:328:5)
    at Promise (C:\Users\skoudoro\AppData\Roaming\npm\node_modules\brainlife\util.js:519:42)
    at new Promise (<anonymous>)
    at ensureUniqueProfile (C:\Users\skoudoro\AppData\Roaming\npm\node_modules\brainlife\util.js:518:16)
    at Object.exports.queryProjects (C:\Users\skoudoro\AppData\Roaming\npm\node_modules\brainlife\util.js:470:43)
    at util.loadJwt.then.jwt (C:\Users\skoudoro\AppData\Roaming\npm\node_modules\brainlife\bl-project-query.js:24:10)
(node:10624) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:10624) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
soichih commented 6 years ago

I just patched this issue. Released CLI 1.2.20. Please upgrade and try again.

skoudoro commented 6 years ago

here an update:

C:\Users\skoudoro>bl project query --admin skoudoro
Multiple profiles matching 'skoudoro'
soichih commented 6 years ago

I've updated the way project query works and released a new version 1.2.23. Please do npm update brainlife -g and try again.

skoudoro commented 6 years ago

perfect! works like a charm. closing