Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9750d8e

Browse files
committedAug 9, 2014
Document using unquote in :dev profile for OS-specific config.
Addresses #1228.
1 parent d3304f6 commit 9750d8e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
 

‎doc/FAQ.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,18 @@
155155
your uberjars will use `clojure.main` as their entry point. You can
156156
launch with `java -jar my-app-standalone.jar -m my.entry.namespace
157157
arg1 arg2 [...]` without any AOT, but it will take longer to launch.
158+
159+
**Q:** I'd like to have certain config active only on a certain OS.
160+
**A:** You can do this by using unquote in the `:dev` profile:
161+
162+
```clj
163+
:profiles {:dev [:dev/all ~(leiningen.core.utils/get-os)]
164+
:dev/all {...}
165+
:linux {...}
166+
:windows {...}
167+
:macosx {...}}
168+
```
169+
170+
You can also check things like `(System/getProperty
171+
"java.specification.version")` to use the JVM version or any other
172+
property.

0 commit comments

Comments
 (0)
Please sign in to comment.