Skip to content

Conversation

@anibalsolon
Copy link
Member

@anibalsolon anibalsolon commented Aug 29, 2022

This PR gives some structure for the cli commands, handling common errors and async/promise instead of callbacks.

For data upload, it uses the commander parsing to verify the arguments.

It solves these two issues + the start for commander upgrade:
#51
https://github.com/brainlife/brainlife/issues/200

@anibalsolon anibalsolon changed the title enh: rework data upload and some util functions [ENH] Rework data upload and some util functions Aug 29, 2022
let program = new commander.Command();
program
.storeOptionsAsProperties(true)
.argument('task-id', 'Id of the task to wait for')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep -id --id options to make it backward compatible.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok!

@soichih
Copy link
Contributor

soichih commented Aug 30, 2022

Thanks for the PR @anibalsolon !! Are you going to update other CLIs also? I believe we need to patch all commands since we are upgrading commander?

@anibalsolon
Copy link
Member Author

@soichih Yes! I will work on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants