mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-13 06:21:15 +00:00
fix: home dir on Windows
This commit is contained in:
parent
d8028e1f20
commit
2c01d264ab
1 changed files with 3 additions and 1 deletions
|
|
@ -20,7 +20,9 @@ function checksumFile(hashName: string, path: string): Promise<string> {
|
||||||
const pathExists = async (path: string): Promise<boolean> => !!(await fs.promises.stat(path).catch(() => false))
|
const pathExists = async (path: string): Promise<boolean> => !!(await fs.promises.stat(path).catch(() => false))
|
||||||
|
|
||||||
const getLintCacheDir = (): string => {
|
const getLintCacheDir = (): string => {
|
||||||
return path.resolve(`${process.env.HOME}/.cache/golangci-lint`)
|
const home = process.platform === "win32" ? process.env.USERPROFILE : process.env.HOME
|
||||||
|
|
||||||
|
return path.resolve(`${home}`, `.cache`, `golangci-lint`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const getIntervalKey = (invalidationIntervalDays: number): string => {
|
const getIntervalKey = (invalidationIntervalDays: number): string => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue