From c48c9dc21fb940b6bf5a48f1144652f51d20311f Mon Sep 17 00:00:00 2001 From: olabusayoT <50379531+olabusayoT@users.noreply.github.com> Date: Fri, 22 Mar 2024 13:16:15 -0400 Subject: [PATCH] Remove DAFFODIL_HOME since IDEs don't need it - remove daffodilRoot, which uses DAFFODIL_HOME, as replacing it with "." is essentially a no-op in the Paths.get function DAFFODIL-2836 --- .../scala/org/apache/daffodil/cli/cliTest/Util.scala | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/daffodil-cli/src/test/scala/org/apache/daffodil/cli/cliTest/Util.scala b/daffodil-cli/src/test/scala/org/apache/daffodil/cli/cliTest/Util.scala index 888cac7d76..6801b40632 100644 --- a/daffodil-cli/src/test/scala/org/apache/daffodil/cli/cliTest/Util.scala +++ b/daffodil-cli/src/test/scala/org/apache/daffodil/cli/cliTest/Util.scala @@ -52,22 +52,20 @@ object Util { private val isWindows = System.getProperty("os.name").toLowerCase().startsWith("windows") - private val daffodilRoot = sys.env.getOrElse("DAFFODIL_HOME", ".") - private val daffodilBinPath = { val ext = if (isWindows) ".bat" else "" - Paths.get(daffodilRoot, s"daffodil-cli/target/universal/stage/bin/daffodil$ext") + Paths.get(s"daffodil-cli/target/universal/stage/bin/daffodil$ext") } /** - * Convert the daffodilRoot + parameter to a java Path. The string + * Convert the parameter to a java Path. The string * parameter should contain unix path separators and it will be interpreted * correctly regardless of operating system. When converted to a string to - * send to the CLI, it will use the correct line separator for the + * send to the CLI, it will use the correct path separator for the * operating system */ def path(string: String): Path = { - Paths.get(daffodilRoot, string) + Paths.get(string) } def devNull(): String = if (isWindows) "NUL" else "/dev/null"