From b96d0ec55c5003f436a239de67719040e49d030a Mon Sep 17 00:00:00 2001 From: Lars Gohr Date: Tue, 19 May 2020 21:28:45 +0200 Subject: [PATCH] Make sure that username and password are masked, before turning on verbose --- entrypoint.sh | 2 ++ test.bats | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 05cdfda..84e9e58 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -5,6 +5,8 @@ main() { echo "" # see https://github.com/actions/toolkit/issues/168 if usesBoolean "${ACTIONS_STEP_DEBUG}"; then + echo "::add-mask::${INPUT_USERNAME}" + echo "::add-mask::${INPUT_PASSWORD}" set -x fi diff --git a/test.bats b/test.bats index aeaab89..bce7650 100755 --- a/test.bats +++ b/test.bats @@ -569,7 +569,9 @@ teardown() { run /entrypoint.sh - expectStdOutContains "sanitize my/repository name" # prints the commands + expectStdOutContains "::add-mask::USERNAME +::add-mask::PASSWORD ++ sanitize my/repository name" } function expectStdOutContains() {