mirror of
https://github.com/actions/setup-java.git
synced 2025-04-19 17:36:45 +00:00
Added support for GPG
This commit is contained in:
parent
5c87b70ffe
commit
d94db22179
17 changed files with 37442 additions and 5142 deletions
26
src/util.ts
Normal file
26
src/util.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
import * as path from 'path';
|
||||
|
||||
export function getTempDir() {
|
||||
let tempDirectory = process.env.RUNNER_TEMP;
|
||||
if (tempDirectory === undefined) {
|
||||
let baseLocation;
|
||||
if (isWindows()) {
|
||||
// On windows use the USERPROFILE env variable
|
||||
baseLocation = process.env['USERPROFILE']
|
||||
? process.env['USERPROFILE']
|
||||
: 'C:\\';
|
||||
} else {
|
||||
if (process.platform === 'darwin') {
|
||||
baseLocation = '/Users';
|
||||
} else {
|
||||
baseLocation = '/home';
|
||||
}
|
||||
}
|
||||
tempDirectory = path.join(baseLocation, 'actions', 'temp');
|
||||
}
|
||||
return tempDirectory;
|
||||
}
|
||||
|
||||
export function isWindows() {
|
||||
return process.platform === 'win32';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue