File tree Expand file tree Collapse file tree 4 files changed +2
-25
lines changed Expand file tree Collapse file tree 4 files changed +2
-25
lines changed Original file line number Diff line number Diff line change 1111 <PackageReference Include =" xunit.runner.visualstudio" Version =" 2.3.1" />
1212 <PackageReference Include =" SixLabors.ImageSharp" Version =" 1.0.0-beta0002" />
1313 <PackageReference Include =" PdfSharp" Version =" 1.50.4845-RC2a" NoWarn =" NU1701" />
14- <PackageReference Include =" Mono.Posix.NETStandard" Version =" 1.0.0" />
1514 </ItemGroup >
1615 <ItemGroup >
1716 <Folder Include =" Issues\" />
Original file line number Diff line number Diff line change 11using System ;
22using System . IO ;
3- using System . Runtime . InteropServices ;
43using System . Threading . Tasks ;
54using Xunit ;
65using Xunit . Abstractions ;
@@ -33,12 +32,6 @@ public async Task ShouldDownloadAndExtractLinuxBinary()
3332 revisionInfo = await browserFetcher . DownloadAsync ( 123456 ) ;
3433 Assert . True ( revisionInfo . Local ) ;
3534 Assert . Equal ( "LINUX BINARY\n " , File . ReadAllText ( revisionInfo . ExecutablePath ) ) ;
36-
37- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) || RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
38- {
39- Mono . Unix . Native . Syscall . stat ( revisionInfo . ExecutablePath , out var stat ) ;
40- Assert . Equal ( BrowserFetcher . BrowserPermissionsInLinux , stat . st_mode & BrowserFetcher . BrowserPermissionsInLinux ) ;
41- }
4235 Assert . Equal ( new [ ] { 123456 } , browserFetcher . LocalRevisions ( ) ) ;
4336 browserFetcher . Remove ( 123456 ) ;
4437 Assert . Empty ( browserFetcher . LocalRevisions ( ) ) ;
Original file line number Diff line number Diff line change 88using System . Threading . Tasks ;
99using System . Net ;
1010using System . IO . Compression ;
11- using Mono . Unix . Native ;
1211
1312namespace PuppeteerSharp
1413{
@@ -34,13 +33,6 @@ public class BrowserFetcher
3433 { Platform . Win64 , "{0}/chromium-browser-snapshots/Win_x64/{1}/chrome-win32.zip" }
3534 } ;
3635
37- internal static readonly FilePermissions BrowserPermissionsInLinux =
38- FilePermissions . S_IRWXU |
39- FilePermissions . S_IRGRP |
40- FilePermissions . S_IXGRP |
41- FilePermissions . S_IROTH |
42- FilePermissions . S_IXOTH ;
43-
4436 /// <summary>
4537 /// Default chromiumg revision.
4638 /// </summary>
@@ -172,7 +164,7 @@ public async Task<RevisionInfo> DownloadAsync(int revision)
172164
173165 if ( new DirectoryInfo ( folderPath ) . Exists )
174166 {
175- return RevisionInfo ( revision ) ;
167+ return null ;
176168 }
177169
178170 var downloadFolder = new DirectoryInfo ( DownloadsFolder ) ;
@@ -203,13 +195,7 @@ public async Task<RevisionInfo> DownloadAsync(int revision)
203195
204196 new FileInfo ( zipPath ) . Delete ( ) ;
205197
206- var revisionInfo = RevisionInfo ( revision ) ;
207-
208- if ( revisionInfo != null && ( GetCurrentPlatform ( ) == Platform . Linux || GetCurrentPlatform ( ) == Platform . MacOS ) )
209- {
210- Syscall . chmod ( revisionInfo . ExecutablePath , BrowserPermissionsInLinux ) ;
211- }
212- return revisionInfo ;
198+ return RevisionInfo ( revision ) ;
213199 }
214200
215201 /// <summary>
Original file line number Diff line number Diff line change @@ -42,6 +42,5 @@ Changes
4242 <PackageReference Include =" System.Net.Http" Version =" 4.3.3" />
4343 <PackageReference Include =" Microsoft.AspNetCore.WebUtilities" Version =" 2.0.2" />
4444 <PackageReference Include =" System.Threading.Tasks.Extensions" Version =" 4.5.1" />
45- <PackageReference Include =" Mono.Posix.NETStandard" Version =" 1.0.0" />
4645 </ItemGroup >
4746</Project >
You can’t perform that action at this time.
0 commit comments