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

env substitutions not occuring with default template processor #486

Closed
coljac opened this issue May 15, 2024 · 2 comments
Closed

env substitutions not occuring with default template processor #486

coljac opened this issue May 15, 2024 · 2 comments
Labels

Comments

@coljac
Copy link

coljac commented May 15, 2024

Describe the bug

When using {{env.VAR}} in a template (##template.default), the resulting output contains the literal {{env.VAR}}, unsubstituted. {{yadm.x}} work as expected.

To reproduce

test.txt##template:

# All lines should be substituted
{{ yadm.hostname }}
{{ yadm.distro }}
{{ env.HOME }}
{{ env.PWD }}

Can this be reproduced with the yadm/testbed docker image: No

In the testbed, it works as expected.

Steps to reproduce the behavior:

echo '{{ env.HOME }}' > "test.txt##template"
yadm add "test.txt##template"
cat test.txt

Expected behavior

I should see {{ env.HOME }} replaced with the appropriate value of $HOME. Instead I see '{{ env.HOME }}', e.g.

myhost
ubuntu
{{ env.HOME }}
{{ env.PWD }}

Environment

  • Operating system: Ubuntu 22.04
  • zsh
  • Version yadm: 3.1.1
  • Version Git: git version 2.34.1
  • GNU Awk 5.1.0

Other

How could I best help debug this?

@coljac coljac added the bug label May 15, 2024
@rasa
Copy link
Contributor

rasa commented May 15, 2024

You need 3.2.2

@coljac
Copy link
Author

coljac commented May 15, 2024

You are right. I did not realise it was a new feature. Apologies!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants