Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save ikenna/d830d95d7a7c12dbd9f3 to your computer and use it in GitHub Desktop.

Select an option

Save ikenna/d830d95d7a7c12dbd9f3 to your computer and use it in GitHub Desktop.
SBT print system properties and env proprties
sbt> eval new scala.sys.SystemProperties().foreach(x => println(x))
sbt> eval scala.sys.env.foreach(x => println(x))
@pietro909
Copy link
Copy Markdown

This gist just made my day <3 Thanks!

@guizmaii
Copy link
Copy Markdown

Same!

If you want them sorted:

eval scala.sys.env.toList.sortBy(_._1).foreach(x => println(x))

@ikenna
Copy link
Copy Markdown
Author

ikenna commented Jun 25, 2022

You are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment