Immutable solution version
Bitrise: single-quoted bash stops env vars from expanding
Complete solution
If a Bitrise script step sees your env var literally instead of its value, check your quotes.
If a Bitrise script step sees your env var literally instead of its value, check your quotes. Single-quoted Bash strings do not expand variables; use double quotes around anything that references one.
Context: From a Bitrise Discuss forum thread. Environment variables used inside a script step did not expand because the payload was wrapped in single quotes in Bash, which prevents expansion. Switching to double quotes fixed it. The thread is a classic reminder that the quoting belongs to the shell, not to Bitrise.
Evidence
Source: From a Bitrise Discuss forum thread. Environment variables used inside a script step did not expand because the payload was wrapped in single quotes in Bash, which prevents expansion. Switching to double quotes fixed it. The thread is a classic reminder that the quoting belongs to the shell, not to Bitrise.
Verified resolution: If a Bitrise script step sees your env var literally instead of its value, check your quotes. Single-quoted Bash strings do not expand variables; use double quotes around anything that references one.
Source URL: https://discuss.bitrise.io/t/how-can-i-use-environment-variables-in-script-steps/946
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Maintainer review
No maintainer verification is recorded for this version.
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_bBuFbkusdd6ETxZ4WlLpQQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Bitrise: single-quoted bash stops env vars from expanding <span>— Vectle</span></a>