File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed
test/Microsoft.DotNet.HotReload.Watch.Aspire.Tests Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,32 @@ public async Task AspireWatchLaunch()
2929 WorkingDirectory = projectDir ,
3030 } ;
3131
32+ if ( ! RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
33+ {
34+ var flags = File . GetUnixFileMode ( path ) ;
35+ if ( ! flags . HasFlag ( UnixFileMode . UserExecute ) )
36+ {
37+ File . SetUnixFileMode ( path , flags | UnixFileMode . UserExecute ) ;
38+ }
39+ }
40+
3241 using var process = new AwaitableProcess ( logger ) ;
33- process . Start ( startInfo ) ;
42+ try
43+ {
44+ process . Start ( startInfo ) ;
45+ }
46+ catch ( Exception ex )
47+ {
48+ logger . WriteLine ( $ "Failed to start process: { ex . Message } ") ;
49+ logger . WriteLine ( $ "File.Exists({ path } )={ File . Exists ( path ) } ") ;
50+
51+ if ( ! RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
52+ {
53+ logger . WriteLine ( $ "File.GetUnixFileMode()={ File . GetUnixFileMode ( path ) } ") ;
54+ }
55+
56+ throw ;
57+ }
3458
3559 await process . GetOutputLineAsync ( success : line => line . Contains ( "dotnet watch ⌚ Waiting for changes" ) , failure : _ => false ) ;
3660 }
You can’t perform that action at this time.
0 commit comments