binbashar / leverage

Binbash Leverage CLI intended to orchestrate Leverage Reference Architecture for AWS (www.binbash.co/leverage)
https://pypi.org/project/leverage/
Apache License 2.0
17 stars 2 forks source link

Leverage CLI to automatically create missing .gitconfig file #267

Open borland667 opened 4 months ago

borland667 commented 4 months ago

Describe the Bug

The Leverage CLI does not automatically create a .gitconfig file in the user's home directory if it is missing, leading to errors during execution.

Expected Behavior

The Leverage CLI should check for the existence of the .gitconfig file in the user's home directory (~/.gitconfig) and create it if it does not exist, ensuring smooth execution without manual intervention.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to a system where the .gitconfig file does not exist in the home directory.
  2. Run any Leverage CLI command that requires the .gitconfig file, e.g., leverage tf shell.
  3. Observe the error related to the missing .gitconfig file.

Screenshots

If applicable, add screenshots or logs to help explain your problem.

Environment (please complete the following information):

Additional Context

This issue is a known problem that affects users when the .gitconfig file is missing. The proposed solution is to update the CLI to automatically create the .gitconfig file in the user's home directory (~/.gitconfig) if it is not found. This enhancement will improve the user experience by reducing manual setup steps.