We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When detecting the OS on a machine running OSX, using the tag both "unix" and "mac" families are matched. Sample build.xml:
<project name="test-os" default="os-setup"> <target name="os-setup"> <if> <os family="windows" /> <then> <echo>It's windows</echo> </then> </if> <if> <os family="mac" /> <then> <echo>It's a mac</echo> </then> </if> <if> <os family="unix" /> <then> <echo>It's unix</echo> </then> </if> </target> </project>
outputs
test-os > os-setup: [echo] It's a mac [echo] It's unix BUILD FINISHED Total time: 0.0901 seconds
Tested on OSX Yosemite.
Migrated from https://www.phing.info/trac/ticket/1227
{ "status": "new", "changetime": "2015-11-19T09:56:27", "description": "When detecting the OS on a machine running OSX, using the <os/> tag both \"unix\" and \"mac\" families are matched. Sample build.xml:\n\n{{{\n<project name=\"test-os\" default=\"os-setup\">\n <target name=\"os-setup\">\n <if>\n <os family=\"windows\" />\n <then>\n <echo>It's windows</echo>\n </then>\n </if>\n <if>\n <os family=\"mac\" />\n <then>\n <echo>It's a mac</echo>\n </then>\n </if>\n <if>\n <os family=\"unix\" />\n <then>\n <echo>It's unix</echo>\n </then>\n </if>\n </target>\n</project>\n}}}\n\noutputs\n\n{{{\ntest-os > os-setup:\n\n [echo] It's a mac\n [echo] It's unix\n\nBUILD FINISHED\n\nTotal time: 0.0901 seconds\n}}}\n\nTested on OSX Yosemite.", "reporter": "[email protected]", "cc": "", "resolution": "", "_ts": "1447926987000288", "component": "phing-core", "summary": "OS detection fails on OSX", "priority": "tbd", "keywords": "", "version": "2.12.0", "time": "2015-11-18T14:03:41", "milestone": "Backlog", "owner": "mrook", "type": "defect" }
The text was updated successfully, but these errors were encountered:
This is normal behavior - you can be even more specific with conditions:
<condition property="isMacOsButNotMacOsX"> <and> <os family="mac"/> <not> <os family="unix"/> </not> </and> </condition>
Sorry, something went wrong.
Nice example @siad007, I'll add that to the docs.
Refs #581 - add some more clarification about mac/unix to os condition
88f7bd7
mrook
No branches or pull requests
When detecting the OS on a machine running OSX, using the tag both "unix" and "mac" families are matched. Sample build.xml:
outputs
Tested on OSX Yosemite.
Migrated from https://www.phing.info/trac/ticket/1227
The text was updated successfully, but these errors were encountered: