mirror of https://github.com/sbt/sbt.git
Merge pull request #319 from eed3si9n/wip/space
Fix unintended glob expansion
This commit is contained in:
commit
43498a2e08
|
|
@ -180,4 +180,14 @@ object SbtRunnerTest extends SimpleTestSuite with PowerAssertions {
|
|||
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=()
|
||||
java_args=($JAVA_OPTS)
|
||||
sbt_options0=(${SBT_OPTS:-$default_sbt_opts})
|
||||
miniscript=$(map_args "${sbt_options0[@]}") && eval ${miniscript/retarr/sbt_options}
|
||||
miniscript=$(map_args "$@") && eval ${miniscript/retarr/args1}
|
||||
miniscript=$(map_args "${sbt_options0[@]}") && eval "${miniscript/retarr/sbt_options}"
|
||||
miniscript=$(map_args "$@") && eval "${miniscript/retarr/args1}"
|
||||
# process the combined args, then reset "$@" to the residuals
|
||||
process_args "${args1[@]}"
|
||||
vlog "[sbt_options] $(declare -p sbt_options)"
|
||||
|
|
|
|||
Loading…
Reference in New Issue