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

How to interpolate a Just variable inside a command evaluated inside another Just variable? #798

Closed
davideliseo opened this issue Apr 7, 2021 · 1 comment

Comments

@davideliseo
Copy link

For example, how, if possible, can I do something like this:

UUID := "<some UUID here>"
deviceName := `blkid -U {{UUID}}`

If I run my justfile with those two lines I get this error:

error: Backtick failed with exit code 2
  |
2 | deviceName := `blkid -U {{UUID}}`
  |               ^^^^^^^^^^^^^^^^^^^

When the expected result is, for example, deviceName := "/dev/sda".

If it's not possible, is there any workaround? I'm using those two variables separately in different recipes. I also want to avoid writing the UUID directly into the blkid command.

Thanks for any help!

@davideliseo davideliseo changed the title How to interpolate a Just variable inside a Just variable? How to interpolate a Just variable inside a command evaluated inside another Just variable? Apr 7, 2021
@casey
Copy link
Owner

casey commented Apr 7, 2021

Unfortunately this currently isn't possible, although hopefully will be soon. See #11 for details of how this would work.

@casey casey closed this as completed Apr 7, 2021
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

2 participants