Write homerc both to USERPROFILE and HOME on Windows

This commit is contained in:
Alex Rodionov 2023-04-27 07:38:12 -07:00
parent 3e0beb3116
commit d23b2a7513
6 changed files with 29 additions and 19 deletions

6
dist/post/index.js vendored
View file

@ -19,6 +19,7 @@ const platform = os.platform()
let bazelDisk = core.toPosixPath(`${homeDir}/.cache/bazel-disk`)
let bazelRepository = core.toPosixPath(`${homeDir}/.cache/bazel-repo`)
let bazelOutputBase = `${homeDir}/.bazel`
let bazelrcPaths = [core.toPosixPath(`${homeDir}/.bazelrc`)]
let userCacheDir = `${homeDir}/.cache`
switch (platform) {
@ -30,6 +31,9 @@ switch (platform) {
bazelRepository = 'D:/_bazel-repo'
bazelOutputBase = 'D:/_bazel'
userCacheDir = `${homeDir}/AppData/Local`
if (process.env.HOME) {
bazelrcPaths.push(core.toPosixPath(`${process.env.HOME}/.bazelrc`))
}
break
}
@ -122,7 +126,7 @@ module.exports = {
paths: {
bazelExternal,
bazelOutputBase: core.toPosixPath(bazelOutputBase),
bazelrc: core.toPosixPath(`${homeDir}/.bazelrc`)
bazelrc: bazelrcPaths
},
platform,
repositoryCache: {

File diff suppressed because one or more lines are too long