Use upper case drives letters in builds for win (#10493)
* Use upper case drives letter in build for win * Change names * Review fixes * clang format * Use fs.realpathSync.native * Use config.rootDir
This commit is contained in:
@@ -21,7 +21,8 @@ const deleteFile = (path) => {
|
||||
}
|
||||
|
||||
const getDepotToolsPath = () => {
|
||||
const depotToolsPath = path.resolve(__dirname, '../../../vendor/depot_tools')
|
||||
const depotToolsPath =
|
||||
path.join(config.rootDir, 'src/brave/vendor/depot_tools')
|
||||
if (!fs.existsSync(depotToolsPath)) {
|
||||
console.warn('Depot Tools path [' + depotToolsPath + '] doesn\'t exist')
|
||||
return ''
|
||||
@@ -48,7 +49,7 @@ const ensureDepotToolsInPath = (options) => {
|
||||
|
||||
const getDefaultOptions = () => {
|
||||
let options = Object.assign({}, config.defaultOptions)
|
||||
options.cwd = path.resolve(__dirname, '../../..')
|
||||
options.cwd = path.join(config.rootDir, 'src/brave')
|
||||
ensureDepotToolsInPath(options)
|
||||
return options
|
||||
}
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
|
||||
module.exports = path.resolve(__dirname, '..', '..', '..', '..', '..')
|
||||
let dirName = __dirname
|
||||
|
||||
// Use fs.realpathSync to normalize the path(__dirname could be c:\.. or C:\..).
|
||||
if (process.platform === 'win32') {
|
||||
dirName = fs.realpathSync.native(dirName)
|
||||
}
|
||||
|
||||
module.exports = path.resolve(dirName, '..', '..', '..', '..', '..')
|
||||
|
||||
Reference in New Issue
Block a user