Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2c01d26

Browse files
committed
fix: home dir on Windows
1 parentd8028e1 commit2c01d26

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/cache.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ function checksumFile(hashName: string, path: string): Promise<string> {
2020
constpathExists=async(path:string):Promise<boolean>=>!!(awaitfs.promises.stat(path).catch(()=>false))
2121

2222
constgetLintCacheDir=():string=>{
23-
returnpath.resolve(`${process.env.HOME}/.cache/golangci-lint`)
23+
consthome=process.platform==="win32" ?process.env.USERPROFILE :process.env.HOME
24+
25+
returnpath.resolve(`${home}`,`.cache`,`golangci-lint`)
2426
}
2527

2628
constgetIntervalKey=(invalidationIntervalDays:number):string=>{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp