Skip to content

evaluate configurations based on operating system #408

Answered by odenix
FractalDesigns asked this question in Q&A
Discussion options

You must be logged in to vote

This should work:

import "pkl:platform"

os = platform.current.operatingSystem.name

https://pkl-lang.org/package-docs/pkl/current/platform/index.html

I'm a little surprised this exists because it can result in non-deterministic output.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@FractalDesigns
Comment options

Answer selected by FractalDesigns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants