-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devops: fix swiftshader on Chromium Windows (#6391)
References #6390
- Loading branch information
1 parent
dddfbaa
commit fd42539
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// See https://github.com/microsoft/playwright/issues/6390 | ||
const fs = require('fs'); | ||
|
||
const FILE_PATH = process.argv[2]; | ||
if (!fs.existsSync(FILE_PATH) || !FILE_PATH.endsWith('.json')) | ||
return; | ||
|
||
const json = JSON.parse(fs.readFileSync(FILE_PATH, 'utf8')); | ||
|
||
if (json.ICD && json.ICD.library_path && json.ICD.library_path.startsWith('.\\')) { | ||
json.ICD.library_path = json.ICD.library_path.substring(2); | ||
fs.writeFileSync(FILE_PATH, JSON.stringify(json), 'utf8'); | ||
} |