Skip to content

Commit 0b64003

Browse files
committed
OrtMain: Also show the ORT user directory as part of the environment info
Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent e5fd9c6 commit 0b64003

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cli/src/main/kotlin/OrtMain.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import com.here.ort.model.Environment
2828
import com.here.ort.model.config.OrtConfiguration
2929
import com.here.ort.utils.PARAMETER_ORDER_LOGGING
3030
import com.here.ort.utils.PARAMETER_ORDER_OPTIONAL
31+
import com.here.ort.utils.getUserOrtDirectory
3132
import com.here.ort.utils.expandTilde
3233
import com.here.ort.utils.printStackTrace
3334

@@ -168,7 +169,9 @@ object OrtMain : CommandWithHelp() {
168169

169170
private fun showVersionHeader(commandName: String?) {
170171
val env = Environment()
171-
val variables = env.variables.entries.map { (key, value) -> "$key = $value" }
172+
173+
val variables = mutableListOf("$ORT_USER_HOME_ENV = ${getUserOrtDirectory()}")
174+
env.variables.entries.mapTo(variables) { (key, value) -> "$key = $value" }
172175

173176
val command = commandName?.let { " '$commandName'" }.orEmpty()
174177
val with = if (variables.isNotEmpty()) " with" else "."

0 commit comments

Comments
 (0)