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

Recipe parameters for variables? #2209

Open
bukowa opened this issue Jun 29, 2024 · 3 comments
Open

Recipe parameters for variables? #2209

bukowa opened this issue Jun 29, 2024 · 3 comments

Comments

@bukowa
Copy link
Contributor

bukowa commented Jun 29, 2024

Can it be done?

[unix]
export VAR=1

[windows]
export VAR=2
@laniakea64
Copy link
Contributor

So you're seeking to export different values for a particular environment variable depending whether running on Windows or a Unix OS?

Does this do what you're looking for? -

export VAR := if os_family() == 'windows' { "2" } else { "1" }

@bukowa
Copy link
Contributor Author

bukowa commented Jun 30, 2024

So you're seeking to export different values for a particular environment variable depending whether running on Windows or a Unix OS?

Does this do what you're looking for? -

export VAR := if os_family() == 'windows' { "2" } else { "1" }

Yes, thank you. I was hoping for a (e.g. undocumented) more expressive expression like in my example.

@casey
Copy link
Owner

casey commented Jun 30, 2024

I'm not opposed to allowing OS attributes on variables, so I'll leave this open.

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

3 participants