File tree 2 files changed +11
-4
lines changed
Peachpie.CodeAnalysis/CommandLine
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
18
18
/// </summary>
19
19
public static int Main ( string [ ] args )
20
20
{
21
- Debugger . Launch ( ) ;
22
-
23
21
// $"/baseDirectory:{BasePath}",
24
22
// $"/sdkDirectory:{NetFrameworkPath}",
25
23
// $"/additionalReferenceDirectories:{libs}",
Original file line number Diff line number Diff line change @@ -368,10 +368,12 @@ public override bool Execute()
368
368
{
369
369
cancellation . ThrowIfCancellationRequested ( ) ;
370
370
371
- Debug . Assert ( File . Exists ( PeachpieCompilerFullPath ) ) ;
371
+ var compilerPath = Path . GetFullPath ( PeachpieCompilerFullPath ) ;
372
+
373
+ Debug . Assert ( File . Exists ( compilerPath ) ) ;
372
374
373
375
//
374
- var pi = new ProcessStartInfo ( PeachpieCompilerFullPath )
376
+ var pi = new ProcessStartInfo ( compilerPath )
375
377
{
376
378
Arguments = FlatternArgs ( args ) ,
377
379
CreateNoWindow = true ,
@@ -382,6 +384,13 @@ public override bool Execute()
382
384
UseShellExecute = false ,
383
385
} ;
384
386
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
+
385
394
//
386
395
var process = Process . Start ( pi ) ;
387
396
var dataReceived = new DataReceivedEventHandler ( ( o , e ) =>
You can’t perform that action at this time.
0 commit comments