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

All text after subsitution is being eaten #3

Open
Ikke opened this issue Nov 28, 2021 · 5 comments
Open

All text after subsitution is being eaten #3

Ikke opened this issue Nov 28, 2021 · 5 comments

Comments

@Ikke
Copy link

Ikke commented Nov 28, 2021

Input:

VAR='${VAR}'
${TEST}def

Execution:

VAR=var TEST=abc envsubst <input >output

Output:

VAR='test
abc

Expected:

VAR='test'
abcdef

All text in the input that comes after the substitution is missing.

@kaniini
Copy link
Owner

kaniini commented Nov 28, 2021

interesting.

1 similar comment
@ghost
Copy link

ghost commented Mar 3, 2022

interesting.

@tinco
Copy link

tinco commented Jan 3, 2023

Ran into this bug aswell. Bug is here:

char *end_p = strpbrk(p, " /\t\r\n");

You only stop consuming the variable name at whitespace, but in regular shells there are more tokens that end a variable name. In this case the ' token and for me it was " that got eaten. Will you be applying a fix @kaniini or are you no longer interested in maintaining this tool? I find it quite useful :)

@virusdefender
Copy link

same issue

nekopsykose added a commit to nekopsykose/envsubst that referenced this issue May 16, 2023
@david0
Copy link

david0 commented Aug 3, 2023

same here

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

No branches or pull requests

5 participants