enso/project/Platform.scala
Ara Adkins 746521f8b2
Bump SBT and Scalafmt (#1203)
Co-authored-by: Radosław Waśko <radoslaw.wasko@enso.org>
Co-authored-by: Dmitry Bushev <bushevdv@gmail.com>
2020-10-22 16:12:28 +02:00

18 lines
474 B
Scala

object Platform {
/** Returns true if the build system is running on Windows.
*/
def isWindows: Boolean =
sys.props("os.name").toLowerCase().contains("windows")
/** Returns true if the build system is running on Linux.
*/
def isLinux: Boolean =
sys.props("os.name").toLowerCase().contains("linux")
/** Returns true if the build system is running on macOS.
*/
def isMacOS: Boolean =
sys.props("os.name").toLowerCase().contains("mac")
}