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

refactor(webinstall): Reprompt after invalid input instead of exiting #1585

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

HendrikHuebner
Copy link
Contributor

@HendrikHuebner HendrikHuebner commented Apr 21, 2024

Prerequisite checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Ran make fmt on your commit series before opening this PR;
  • Updated relevant documentation.

Description of changes

Closes #1561

When a user enters something invalid in response to a prompt by the webinstall script, the script now displays a message such as:

Invalid input. Please try again or exit with Ctrl+C.

Additionally, for yes/no questions I have created the prompt_user_yes_no function, which simplifies the script a little bit since it gets rid of some duplicated code.

@craciunoiuc craciunoiuc changed the title refactor: Make install script promp user again after invalid input instead of exiting refactor: Make install script reprompt user after invalid input instead of exiting Apr 22, 2024
@craciunoiuc craciunoiuc changed the title refactor: Make install script reprompt user after invalid input instead of exiting refactor(webinstall): Make install script reprompt user after invalid input instead of exiting Apr 22, 2024
Copy link
Member

@craciunoiuc craciunoiuc left a comment

Choose a reason for hiding this comment

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

Hey @HendrikHuebner

Looks really good, left you a comment. I still need to try it out.

Can you also reword your commit to start with refactor(webinstall): 🙏

refactor(webinstall): Prompt user again on invalid input instead of exiting

Make sure you leave a single commit afterwards

tools/webinstall/install.sh Show resolved Hide resolved
@craciunoiuc craciunoiuc changed the title refactor(webinstall): Make install script reprompt user after invalid input instead of exiting refactor(webinstall): Reprompt after invalid input instead of exiting Apr 23, 2024
Copy link
Member

@craciunoiuc craciunoiuc left a comment

Choose a reason for hiding this comment

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

Seems that the commit is still to long 😅

Try renaming it to, this one, it's 70 chars:

refactor(webinstall): Reprompt after invalid input instead of exiting

We can merge after

Previous one was 76 > 74 chars whoops

Signed-off-by: Hendrik Hübner  <117831077+HendrikHuebner@users.noreply.github.com>
Copy link
Member

@craciunoiuc craciunoiuc left a comment

Choose a reason for hiding this comment

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

All good here. Thanks!

Reviewed-by: Cezar Craciunoiu cezar.craciunoiu@unikraft.io
Approved-by: Cezar Craciunoiu cezar.craciunoiu@unikraft.io

@craciunoiuc craciunoiuc merged commit 6183dbf into unikraft:staging Apr 24, 2024
3 of 4 checks passed
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.

Webinstall script: Prompt user to try again on invalid input
2 participants