mirror of https://github.com/sbt/sbt.git
Fix unintended glob expansion
Fixes https://github.com/sbt/sbt/issues/5343
This commit is contained in:
parent
269533c160
commit
1a2ca2610b
|
|
@ -180,4 +180,14 @@ object SbtRunnerTest extends SimpleTestSuite with PowerAssertions {
|
||||||
assert(out.contains[String]("[info] HelloTest"))
|
assert(out.contains[String]("[info] HelloTest"))
|
||||||
()
|
()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test("quoted * should not glob expand to local files") {
|
||||||
|
val out = sbtProcess("testOnly * ", "--no-colors", "-v", "-debug").!!.linesIterator.toList
|
||||||
|
|
||||||
|
// Ensure the "*" doesn't get glob expanded to individual files or directories
|
||||||
|
// (e.g. Hello.scala gets added to the testOnly arguments) https://github.com/sbt/sbt/issues/5343
|
||||||
|
assert(!out.exists(x => x.contains("testOnly") && x.contains("Hello.scala")))
|
||||||
|
assert(out.contains[String]("[info] HelloTest"))
|
||||||
|
()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -353,8 +353,8 @@ run() {
|
||||||
local retarr=()
|
local retarr=()
|
||||||
java_args=($JAVA_OPTS)
|
java_args=($JAVA_OPTS)
|
||||||
sbt_options0=(${SBT_OPTS:-$default_sbt_opts})
|
sbt_options0=(${SBT_OPTS:-$default_sbt_opts})
|
||||||
miniscript=$(map_args "${sbt_options0[@]}") && eval ${miniscript/retarr/sbt_options}
|
miniscript=$(map_args "${sbt_options0[@]}") && eval "${miniscript/retarr/sbt_options}"
|
||||||
miniscript=$(map_args "$@") && eval ${miniscript/retarr/args1}
|
miniscript=$(map_args "$@") && eval "${miniscript/retarr/args1}"
|
||||||
# process the combined args, then reset "$@" to the residuals
|
# process the combined args, then reset "$@" to the residuals
|
||||||
process_args "${args1[@]}"
|
process_args "${args1[@]}"
|
||||||
vlog "[sbt_options] $(declare -p sbt_options)"
|
vlog "[sbt_options] $(declare -p sbt_options)"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue