Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add --no-upgrade flag #79

Merged
merged 1 commit into from
May 9, 2024
Merged

feat: add --no-upgrade flag #79

merged 1 commit into from
May 9, 2024

Conversation

zlalvani
Copy link
Collaborator

@zlalvani zlalvani commented May 8, 2024

This is useful in cases where you use a different tool to perform the upgrade, or you did it manually

@zlalvani zlalvani requested review from noqcks and shihanwan May 8, 2024 23:52
@@ -254,6 +255,7 @@ const App = (props: {
"-p",
`${port}`,
...(token ? ["-t", token] : []),
...(props.upgrade ? [] : ["-n"]),
Copy link
Contributor

Choose a reason for hiding this comment

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

does upgrade need to come before token in the args?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

they're flags so it shouldn't matter

.option("-s, --simple", "simple mode")
.option("-i, --ipc", "run in ipc mode")
.parse();

const { model, language, port, ipc, simple, token } = command.opts();
const { model, language, port, ipc, simple, token, upgrade } = command.opts();
Copy link
Contributor

Choose a reason for hiding this comment

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

wouldn't it be noUpgrade or something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

commander is smart enough to handle this automatically

Copy link
Contributor

Choose a reason for hiding this comment

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

insane

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the types work automatically too (it parses the string)

@zlalvani zlalvani force-pushed the zlalvani/skip-upgrade-flag branch from 4eb323b to f7528df Compare May 9, 2024 00:04
@zlalvani zlalvani merged commit ec0403b into main May 9, 2024
11 checks passed
@zlalvani zlalvani deleted the zlalvani/skip-upgrade-flag branch May 9, 2024 00:05
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