File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Peachpie.CodeAnalysis/CommandLine Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ public static class PhpCompilerDriver
1818 /// </summary>
1919 public static int Main ( string [ ] args )
2020 {
21- Debugger . Launch ( ) ;
22-
2321 // $"/baseDirectory:{BasePath}",
2422 // $"/sdkDirectory:{NetFrameworkPath}",
2523 // $"/additionalReferenceDirectories:{libs}",
Original file line number Diff line number Diff line change @@ -368,10 +368,12 @@ public override bool Execute()
368368 {
369369 cancellation . ThrowIfCancellationRequested ( ) ;
370370
371- Debug . Assert ( File . Exists ( PeachpieCompilerFullPath ) ) ;
371+ var compilerPath = Path . GetFullPath ( PeachpieCompilerFullPath ) ;
372+
373+ Debug . Assert ( File . Exists ( compilerPath ) ) ;
372374
373375 //
374- var pi = new ProcessStartInfo ( PeachpieCompilerFullPath )
376+ var pi = new ProcessStartInfo ( compilerPath )
375377 {
376378 Arguments = FlatternArgs ( args ) ,
377379 CreateNoWindow = true ,
@@ -382,6 +384,13 @@ public override bool Execute()
382384 UseShellExecute = false ,
383385 } ;
384386
387+ // non-windows?
388+ if ( Environment . OSVersion . Platform != PlatformID . Win32NT )
389+ {
390+ pi . FileName = "dotnet" ;
391+ pi . Arguments = $ "\" { Path . ChangeExtension ( compilerPath , ".dll" ) } \" { pi . Arguments } ";
392+ }
393+
385394 //
386395 var process = Process . Start ( pi ) ;
387396 var dataReceived = new DataReceivedEventHandler ( ( o , e ) =>
You can’t perform that action at this time.
0 commit comments