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

Turn off echo'ing for some tasks #546

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Turn off echo'ing for some tasks #546

wants to merge 1 commit into from

Conversation

xendk
Copy link
Contributor

@xendk xendk commented Dec 6, 2024

Tasks that contain a lot of shell code and echo their own status should be silenced to limit the amount of (useless) output.

Tasks that contain a lot of shell code and echo their own status
should be silenced to limit the amount of (useless) output.
@ITViking
Copy link
Contributor

ITViking commented Dec 9, 2024

are we loosing any vital information here, which, if left in place, would allow us to now in which step something went wrong?

@xendk
Copy link
Contributor Author

xendk commented Dec 12, 2024

@ITViking Nope, it just suppresses printing the command before running it. Basically avoiding filling your terminal with

          if [ -z "{{.SKIP}}" ]; then
            if [ "$(lagoon get project --project "{{.SITE}}" --output-json | jq '.data[0].id' --raw-output)" = "0" ]; then
              PROJECT_NAME="{{.SITE}}" GIT_URL="{{.GIT_URL}}" BRANCHES="{{.BRANCHES}}" task lagoon:project:add;
            else
              PROJECT_NAME="{{.SITE}}" GIT_URL="{{.GIT_URL}}" BRANCHES="{{.BRANCHES}}" task lagoon:project:update;
            fi
          else
            echo "Skipped project ensure."
          fi

Any output from the command is still output.

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