mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-06-08 01:06:12 +02:00
Locate user home in an OS agnostic way
This commit is contained in:
parent
83e6d042d7
commit
c839ac993c
4 changed files with 6 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
import * as fs from 'fs'
|
||||
import * as os from 'os'
|
||||
import * as path from 'path'
|
||||
import * as httpm from 'typed-rest-client/HttpClient'
|
||||
import * as unzip from 'unzipper'
|
||||
|
@ -93,7 +94,7 @@ async function provisionGradle(version: string, url: string): Promise<string> {
|
|||
return cachedExecutable
|
||||
}
|
||||
|
||||
const home = process.env['HOME'] || ''
|
||||
const home = os.homedir()
|
||||
const tmpdir = path.join(home, 'gradle-provision-tmpdir')
|
||||
const downloadsDir = path.join(tmpdir, 'downloads')
|
||||
const installsDir = path.join(tmpdir, 'installs')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue