Skip to content

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

Merged
bkeepers merged 1 commit intobkeepers:mainfrom
maxjacobson:mj/template-multi-line-variables
Apr 30, 2024
Merged

Fix template (-t) handling of multi-line variables#502
bkeepers merged 1 commit intobkeepers:mainfrom
maxjacobson:mj/template-multi-line-variables

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
@bkeepers
Copy link
Owner

Thanks @maxjacobson

@maxjacobson maxjacobson deleted the mj/template-multi-line-variables branch May 1, 2024 14:54
derricklannaman referenced this pull request in powerhome/power-web-development-interview 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
[https://github.com/bkeepers/dotenv/pull/504](https://togithub.com/bkeepers/dotenv/pull/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
[https://github.com/bkeepers/dotenv/pull/495](https://togithub.com/bkeepers/dotenv/pull/495)
- Fix template (-t) handling of multi-line variables by
[@&#8203;maxjacobson](https://togithub.com/maxjacobson) in
[https://github.com/bkeepers/dotenv/pull/502](https://togithub.com/bkeepers/dotenv/pull/502)
- Guard against restore being called with no previously saved state by
[@&#8203;bkeepers](https://togithub.com/bkeepers) in
[https://github.com/bkeepers/dotenv/pull/503](https://togithub.com/bkeepers/dotenv/pull/503)

#### New Contributors

- [@&#8203;javierjulio](https://togithub.com/javierjulio) made their
first contribution in
[https://github.com/bkeepers/dotenv/pull/495](https://togithub.com/bkeepers/dotenv/pull/495)
- [@&#8203;maxjacobson](https://togithub.com/maxjacobson) made their
first contribution in
[https://github.com/bkeepers/dotenv/pull/502](https://togithub.com/bkeepers/dotenv/pull/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.

2 participants