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

Fix template (-t) handling of multi-line variables #502

Merged

Conversation

maxjacobson
Copy link
Contributor

I'm noticing that multi-line variables aren't properly templated. This input:

FOO=BAR
FOO2="BAR2
BAR2
BAR2
BAR2"
FOO3=BAR3

produces this output:

FOO=FOO
FOO2=FOO2
BAR2
BAR2
BAR2"
FOO3=FOO3

My expectation is that it would instead produce this output:

FOO=FOO
FOO2=FOO2
FOO3=FOO3

I'm noticing that multi-line variables aren't properly templated. This
input:

```
FOO=BAR
FOO2="BAR2
BAR2
BAR2
BAR2"
FOO3=BAR3
```

produces this output:

```
FOO=FOO
FOO2=FOO2
BAR2
BAR2
BAR2"
FOO3=FOO3
```

My expectation is that it would instead produce this output:

```
FOO=FOO
FOO2=FOO2
FOO3=FOO3
```
@bkeepers bkeepers merged commit e43d34a into bkeepers:main Apr 30, 2024
12 checks passed
@bkeepers
Copy link
Owner

Thanks @maxjacobson

@maxjacobson maxjacobson deleted the mj/template-multi-line-variables branch May 1, 2024 14:54
derricklannaman pushed a commit to powerhome/power-web-development-interview that referenced this pull request Jun 7, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [dotenv-rails](https://togithub.com/bkeepers/dotenv) | `3.1.0` ->
`3.1.2` |
[![age](https://developer.mend.io/api/mc/badges/age/rubygems/dotenv-rails/3.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/rubygems/dotenv-rails/3.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/rubygems/dotenv-rails/3.1.0/3.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/rubygems/dotenv-rails/3.1.0/3.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>bkeepers/dotenv (dotenv-rails)</summary>

###
[`v3.1.2`](https://togithub.com/bkeepers/dotenv/blob/HEAD/Changelog.md#312)

[Compare
Source](https://togithub.com/bkeepers/dotenv/compare/v3.1.1...v3.1.2)

- Fix: "can't modify frozen Hash" when stubbing ENV by
[@&#8203;bkeepers](https://togithub.com/bkeepers) in
[bkeepers/dotenv#504

**Full Changelog**:
bkeepers/dotenv@v3.1.1...v3.1.2

###
[`v3.1.1`](https://togithub.com/bkeepers/dotenv/releases/tag/v3.1.1):
3.1.1

[Compare
Source](https://togithub.com/bkeepers/dotenv/compare/v3.1.0...v3.1.1)

#### What's Changed

- Require version file so VERSION is available by
[@&#8203;javierjulio](https://togithub.com/javierjulio) in
[bkeepers/dotenv#495
- Fix template (-t) handling of multi-line variables by
[@&#8203;maxjacobson](https://togithub.com/maxjacobson) in
[bkeepers/dotenv#502
- Guard against restore being called with no previously saved state by
[@&#8203;bkeepers](https://togithub.com/bkeepers) in
[bkeepers/dotenv#503

#### New Contributors

- [@&#8203;javierjulio](https://togithub.com/javierjulio) made their
first contribution in
[bkeepers/dotenv#495
- [@&#8203;maxjacobson](https://togithub.com/maxjacobson) made their
first contribution in
[bkeepers/dotenv#502

**Full Changelog**:
bkeepers/dotenv@v3.1.0...v3.1.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/powerhome/power-web-development-interview).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM0MC4xMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

None yet

2 participants