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

Docs for "OperatingSystemKind" condition? #1421

Closed
rmunn opened this issue Feb 20, 2018 · 2 comments
Closed

Docs for "OperatingSystemKind" condition? #1421

rmunn opened this issue Feb 20, 2018 · 2 comments

Comments

@rmunn
Copy link

rmunn commented Feb 20, 2018

In #1042, @mlorbetske gives a sample post-action with "condition": "(OS != \"windows\")" so that it will only run on non-Windows systems. But in SAFE-Stack/SAFE-template#36, it seems that that condition doesn't actually work to exclude a post-action from a Windows machine, causing the template installation to fail. (That particular post-action runs the Unix chmod command, so it will only work on Linux or OS X machines). I've found one reference to a condition called OperatingSystemKind, but I haven't found any documentation for that condition. What values is it expected to have? How should I use it to ensure that a particular post-action only runs on Unix-like systems?

@mlorbetske
Copy link
Contributor

I believe the conditioning for "Windows or not" needs a value of Windows_NT (the value of the OS environment variable since Windows 2000/XP)

@rmunn
Copy link
Author

rmunn commented Feb 25, 2018

Yep, changing the condition to "(OS != \"Windows_NT\")" fixed SAFE-Stack/SAFE-template#36. And on further research, I found that the OperatingSystemKind variable I was asking about was a config variable set up just for those specific unit tests, and is not something generally available. So OS is the environment variable to check.

And this issue can be closed: now that I know how to check for Windows properly, I've updated the documentation for the chmod post-action to have the right condition, so there's no further action needed on this AFAICT.

@rmunn rmunn closed this as completed Feb 25, 2018
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