madskristensen / WebCompiler

Visual Studio extension for compiling LESS and Sass files
Other
451 stars 174 forks source link

Doesn't work correctly on OSX #260

Open a-h opened 8 years ago

a-h commented 8 years ago

Installed product versions

When compiling a Web app using VS Code on OSX, the compilation fails with the exception:

(WebCompile target) -> /Users/name/Documents/projectname/Content/main.scss : WebCompiler error 0: ApplicationName='cmd.exe', CommandLine='/c ""/var/folders/v0/gv8rbbt9157g5599sh8qljpr0000gn/T/WebCompiler1.11.312/node_modules.bin\node-sass.cmd" --precision=5 --output-style=nested --indent-type=space --indent-width=2

Steps to recreate

Try and compile using VS Code on OSX.

Current behavior

It's assuming the existence of cmd.exe when it could be that the platform is using bash as its command interpreter.

Expected behavior

Should use bash and review the contents of node-sass.cmd to make sure they're platform independent too.

a-h commented 8 years ago

The cause of the issue is visible at https://github.com/madskristensen/WebCompiler/blob/119c2c003196d3d395383bcfd5638d3ad22b0333/src/WebCompiler/Compile/SassCompiler.cs

The RunCompilerProcess assumes Windows.

a-h commented 8 years ago

Workaround to disable it on OSX: <Import Project="..\packages\BuildWebCompiler.1.11.312\build\BuildWebCompiler.targets" Condition="'$(OS)' != 'Unix' AND Exists('..\packages\BuildWebCompiler.1.11.312\build\BuildWebCompiler.targets')" />

See: http://www.mono-project.com/archived/porting_msbuild_projects_to_xbuild/

asser-dk commented 6 years ago

Support for bash (or whatever you're supposed to call it) would be excellent as this is a quite annoying issue if you use WSL as your terminal instead of PS/CMD.

PeterHagen commented 6 years ago

Perhaps its an option to switch to powershell (core), instead of the cmd script. Powershell is now also supported on linux and mac. This way only one script has to be maintained.

It would be create if BuildWebCompiler works on Mac, so I can use Rider Ide fulltime

uc18 commented 3 years ago

Doesnt work on Rider, OSX

WebCompiler cant find compilerconfig.json