Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: check mandatory options before allowing any action
In case some of the config files are present (user or worktree) but without any content, 'lab' fails while trying to get the user because 'host' is empty. Another errors occur in case 'core.user' and 'core.token' are present, but 'core.host' is left empty: gitlab call to the API fails. With this patch we make sure we have the minimal config options set before lab tries to execute anything else: even if after all attempts to set the mandatory options they still are empty: 'core.host' string is set to the default GitLab host instead and for 'core.token' we error out the default user authentication error message. Signed-off-by: Bruno Meneguele <[email protected]>
- Loading branch information