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

#6 Setup the Config Command #12

Merged
merged 3 commits into from
Apr 24, 2024
Merged

Conversation

harrisonhoward
Copy link
Owner

@harrisonhoward harrisonhoward commented Apr 24, 2024

Task

Set up the config command to prompt the user to fill in the BaseConfig information and write it to the config file. This command should provide all information to the user about how to exit the terminal.

It should also provide information about how to determine the following:

  • What are the required prompts
  • What is the default for the prompt
  • What is the current saved value for the prompt
  • If the user enters nothing what is used?

Changes

  • terminal
    • Add question_int method to the terminal util. This will handle the port prompt, it essentially allows the user to enter 'exit' as well as force them to enter a number.
    • Added default support to all prompt methods, this will determine what is required and what is optional.
  • env
    • Fixed an issue where dot_env couldn't read the saved config because the port wasn't wrapped in single quotes.
  • config
    • Send a list of prints to the terminal that indicate all important information about the command. Typing 'exit' will exit the terminal. Required prompts are indicated by the suffix '*'. Defaults are indicated by 'default=X'. Current saved values are indicated by 'current=X'. When entering nothing, the current saved value has priority over the default. If the prompt doesn't have a default then entering nothing will unset the value.
    • Prompt the user for each field (does not include token, that is handled in the auth command)
    • Once all values are retrieved save them to the environment file
    • If successfully inform the user and print the information saved. If it fails inform the user the saving has failed with the error type.

@harrisonhoward harrisonhoward self-assigned this Apr 24, 2024
@harrisonhoward harrisonhoward added the enhancement New feature or request label Apr 24, 2024
@harrisonhoward harrisonhoward marked this pull request as ready for review April 24, 2024 12:24
@harrisonhoward harrisonhoward merged commit 023423d into master Apr 24, 2024
1 check passed
@harrisonhoward harrisonhoward deleted the feature/#6--setup-config-command branch April 24, 2024 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant