Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@ module.exports = function (grunt) {

const versionPlaceholder = '"#version#"';

// Resolve a Puppeteer executable for local dev where managed-device Defender/WDAC
// blocks Puppeteer's unsigned bundled Chromium (Windows "blocked by IT admin" popups).
// Falls back to installed Edge locally. On CI/official builds it returns undefined so
// the bundled Chromium is used unchanged.
function _getBrowserExecutablePath() {
if (process.env.PUPPETEER_EXECUTABLE_PATH) {
return process.env.PUPPETEER_EXECUTABLE_PATH;
}
if (process.env.TF_BUILD || process.env.CI || process.env.BUILD_BUILDID) {
return undefined; // CI / official build => use bundled Chromium
}
var candidates = [
process.env["ProgramFiles(x86)"] + "\\Microsoft\\Edge\\Application\\msedge.exe",
process.env["ProgramFiles"] + "\\Microsoft\\Edge\\Application\\msedge.exe"
];
for (var i = 0; i < candidates.length; i++) {
if (candidates[i] && grunt.file.exists(candidates[i])) {
return candidates[i];
}
}
return undefined;
}
var browserExecutablePath = _getBrowserExecutablePath();

const aiCoreDefaultNameReplacements = [
];

Expand Down Expand Up @@ -256,6 +280,7 @@ module.exports = function (grunt) {
headless: true,
timeout: 30000,
ignoreHTTPErrors: true,
executablePath: browserExecutablePath,
args:[
"--enable-precise-memory-info",
"--expose-internals-for-testing",
Expand Down Expand Up @@ -304,6 +329,7 @@ module.exports = function (grunt) {
headless: true,
timeout: 30000,
ignoreHTTPErrors: true,
executablePath: browserExecutablePath,
args:[
"--enable-precise-memory-info",
"--expose-internals-for-testing",
Expand Down
Loading
Loading