Fix mask_secrets in shell_command to Use Mutable String
What does this MR do and why?
We try to perform a gsub
operation on a frozen string in mask_secrets
in shell_command.rb
, causing this error: gitlab#374553 (closed)
This changes input
to return a duplicated, mutable string if it is frozen, or the string itself, if not frozen.
This operator was also used in the previous mask_secrets
method before !1031 (merged) was implemented: https://gitlab.com/gitlab-org/gitlab-qa/-/blob/43a3c403457f4d93de4a1ce50cb316d09db00b7a/lib/gitlab/qa/docker/command.rb#L52
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Valerie Burton