Skip to content

Commit

Permalink
Merge pull request #256 from unoplatform/dev/eb/disable-wsl
Browse files Browse the repository at this point in the history
fix: ForceDisableWSL wasn't honored
  • Loading branch information
ebariche authored Jul 21, 2020
2 parents 0b68c61 + 4c1b298 commit 6f5bacc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ The Bootstrapper tooling will generate two folders `_compressed_gz` and `_compre
When building an application, place [the following file](src/Uno.Wasm.Sample/wwwroot/web.config) in the `wwwroot` folder to automatically enable the use of pre-compressed files.

The parameters for the compression are as follows:
- `WasmShellGenerateCompressedFiles` which can be `true` of `false`. This property is ignored when building `MonoRuntimeDebuggerEnabled` is set to `true`.
- `WasmShellGenerateCompressedFiles` which can be `true` or `false`. This property is ignored when building `MonoRuntimeDebuggerEnabled` is set to `true`.
- `WasmShellCompressedExtension` is an item group which specifies which files to compress. By default `wasm`, `clr`, `js`, `css` and `html files are pre-compressed. More files can be added as follows:
```xml
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Uno.Wasm.Bootstrap/ShellTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ as the BrotliStream must be closed in order to signal that no more blocks are be

private (int exitCode, string output, string error) RunProcess(string executable, string parameters, string? workingDirectory = null)
{
if (IsWSLRequired)
if (IsWSLRequired && !ForceDisableWSL)
{
var unixPath = AlignPath(executable, escape: true);
var monoPath = executable.EndsWith(".exe") ? "mono" : "";
Expand Down Expand Up @@ -485,7 +485,7 @@ as the BrotliStream must be closed in order to signal that no more blocks are be

private string AlignPath(string path, bool escape = false)
{
var output = IsWSLRequired ? $"`wslpath \"{path.Replace("\\\\?\\", "")}\"`" : path;
var output = IsWSLRequired && !ForceDisableWSL ? $"`wslpath \"{path.Replace("\\\\?\\", "")}\"`" : path;

if (escape)
{
Expand Down

0 comments on commit 6f5bacc

Please sign in to comment.