add explaination of extracting from the ENCODED env var

This commit is contained in:
Lachlan Sylvester 2022-12-28 22:29:20 +11:00
parent 2f42c5810a
commit b1bc3a0b20
1 changed files with 3 additions and 1 deletions

View File

@ -58,7 +58,9 @@ namespace :test do
sleep 0.2
end
system(Hash[*Base64.decode64(ENV.fetch("ENCODED", "")).split(/[ =]/)], "npm", "test")
# Decode the obfuscate environment variables
decoded_environment_variables = Hash[*Base64.decode64(ENV.fetch("ENCODED", "")).split(/[ =]/)]
system(decoded_environment_variables, "npm", "test")
status = $?.exitstatus
ensure
Process.kill("KILL", -pid) if pid