mirror of
https://github.com/sbt/sbt.git
synced 2026-08-28 17:13:56 +02:00
Don't strip quotes in _sbt_ scripted command arguments
Stripping quotation marks makes it impossible to cleanly test certain sbt features without resorting to weird hacks. For example: > set Compile / scalacOptions += "-Xfatal-warnings" did not work while > set Compile / scalacOptions += '"-Xfatal-warnings"' did. I leave the single quote parser unchanged since single quotes are not really used in sbt and so there is utility in leaving them as a way to group arguments that should not be split apart. This change should only affect the scripted tests in the sbt repo. We can consider making stripQuotes = false the default for the plugin as well.
This commit is contained in:
@@ -443,7 +443,7 @@ final class ScriptedTests(
|
||||
catching(classOf[TestException]).withApply(testFailed).andFinally(log.clear).apply {
|
||||
preScriptedHook(testDirectory)
|
||||
val parser = new TestScriptParser(handlers)
|
||||
val handlersAndStatements = parser.parse(file)
|
||||
val handlersAndStatements = parser.parse(file, stripQuotes = false)
|
||||
runner.apply(handlersAndStatements, states)
|
||||
|
||||
// Handle successful tests
|
||||
|
||||
Reference in New Issue
Block a user