Arnab
03/27/2025, 10:48 AM/**
* Load configuration from optional Properties file format on disk
*/
fun fromOptionalFile(file: File): Environment = if (file.exists()) from(file) else EMPTY
Should I just submit a PR and explain my usecase or would you like me to create an issue first? This is a very simple change that has like 5-6 lines total of code (including tests)Andrew O'Hara
03/27/2025, 1:28 PMfun fromOrEmpty(file: File): Environment
Since the existing from
doesn't mention file.
Apart from that, you don't need to make an issue first. Just no guarantee the PR is accepted 🤷James Richardson
03/28/2025, 11:21 AMArnab
03/29/2025, 3:30 PMAndrew O'Hara
03/30/2025, 2:50 AMval env = args.firstOrNull()
?.let { Environment.from(File(it)) overrides Environment.ENV }
?: Environment.ENV