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

Shell variables are expanded before the script is run #20

Open
gaddman opened this issue Apr 30, 2021 · 0 comments
Open

Shell variables are expanded before the script is run #20

gaddman opened this issue Apr 30, 2021 · 0 comments

Comments

@gaddman
Copy link

gaddman commented Apr 30, 2021

When using this plugin shell variables may be expanded before the script is run, depending on the format used.
This will work fine:

#!/usr/bin/env bash

myvar="pickles"
echo "myvar is $myvar"

printing:
myvar is pickles

While this will fail:

#!/usr/bin/env bash

myvar="pickles"
echo "myvar is ${myvar}"

printing:
myvar is

This works fine with the builtin inline script plugin. While the example above is trivial, the second format is used for bash parameter expansions, so those are not possible.

pmoranga added a commit to pmoranga/nixy-step-plugins that referenced this issue Jul 20, 2023
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

1 participant