diff options
author | Kristina Chodorow <kchodorow@google.com> | 2015-04-30 15:38:43 +0000 |
---|---|---|
committer | John Field <jfield@google.com> | 2015-04-30 18:45:37 +0000 |
commit | 1373653f6d4903963abdd5daceabf3193fa240f4 (patch) | |
tree | b9c2fbceae2af445f4cffe87ce03184adbdd8b78 /src/main/java/com | |
parent | 6d9fb360b79ec040e423b20b72a9cc3c4bac5b54 (diff) |
Don't allow launching from a directory with a space in the name
Further improvements on #167.
--
MOS_MIGRATED_REVID=92459390
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java index 6d0c14b035..d1830159ea 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java @@ -22,6 +22,7 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.ListMultimap; import com.google.common.collect.Lists; import com.google.common.io.Flushables; +import com.google.devtools.build.lib.Constants; import com.google.devtools.build.lib.events.Event; import com.google.devtools.build.lib.events.EventHandler; import com.google.devtools.build.lib.events.Reporter; @@ -155,6 +156,13 @@ public class BlazeCommandDispatcher { } Path workspace = runtime.getWorkspace(); + // TODO(kchodorow): Remove this once spaces are supported. + if (workspace.getPathString().contains(" ")) { + outErr.printErrLn(Constants.PRODUCT_NAME + " does not currently work properly from paths " + + "containing spaces (" + workspace + ")."); + return ExitCode.LOCAL_ENVIRONMENTAL_ERROR; + } + Path doNotBuild = workspace.getParentDirectory().getRelative( BlazeRuntime.DO_NOT_BUILD_FILE_NAME); if (doNotBuild.exists()) { |