diff --git a/lib/util.js b/lib/util.js index ae414b2591f8..0815f29bbf78 100755 --- a/lib/util.js +++ b/lib/util.js @@ -6,12 +6,21 @@ const crypto = require('crypto') const autoGeneratedBraveToChromiumMapping = Object.assign({}, require('./l10nUtil').autoGeneratedBraveToChromiumMapping) const os = require('os') +const fixPywin32 = (options = {}) => { + if (process.platform !== 'win32') { + return + } + console.log("Manually installing pywin32 python module") + util.run('python', ['-m', 'pip', 'install', 'pywin32'], options) +} + const runGClient = (args, options = {}) => { if (config.gClientVerbose) args.push('--verbose') options.cwd = options.cwd || config.rootDir options = mergeWithDefault(options) options.env.GCLIENT_FILE = config.gClientFile util.run('gclient', args, options) + fixPywin32(options) } const mergeWithDefault = (options) => {