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

Improve alias command output #246

Merged
merged 1 commit into from
Jan 17, 2022
Merged

Conversation

swalkinshaw
Copy link
Member

Hides Ansible playbook output (since it's an implementation detail) and uses a spinner since it can take a few seconds.

image

@tangrufus should we just append this to wp-cli.local.yml automatically?

Adds a spinner since it can take a few seconds.
@swalkinshaw
Copy link
Member Author

We can look into appending to wp-cli.local.yml automatically separately

@swalkinshaw swalkinshaw merged commit 5798803 into master Jan 17, 2022
@swalkinshaw swalkinshaw deleted the improve-alias-cmd-output branch January 17, 2022 02:03
@tangrufus
Copy link
Collaborator

tangrufus commented Feb 7, 2022

should we just append this to wp-cli.local.yml automatically?

Probably not. The idea of having a separate wp-cli.trellis-alias.yml is to ensure users do not mess with our generated file AND we don't mess with users' original wp-cli config files.

If we are to append this to wp-cli.local.yml, we need to:

  1. wrap our alias config in some # Trellis-CLI generated. DO NOT MODIFY! comments
  2. ensure we only change our alias config when updating, i.e: do not mess with users' original configs

Option A

Search and replace between the do not modify comments.

I can foresee users modifying our alias config without aware of it. VS code auto formatting the indentation might work but we are going to break something when we search and replace.

Option B

  1. Keep do not modify comments
  2. Read wp-cli.local.yml via a yaml parser
  3. Marshal the whole wp-cli.local.yml with new alias config (i.e: rewrite the whole wp-cli.local.yml)

Less error prone. OCD users will hate us changing all their styling (indentations, hyphen arrays VS square bracket arrays, etc).

@swalkinshaw
Copy link
Member Author

Makes sense 👍 let's keep it as is

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