mirror of https://github.com/actions/toolkit
Check the right variables (#35)
parent
2a2b51f939
commit
5218a83722
|
@ -7,8 +7,8 @@ import * as exec from '@actions/exec'
|
||||||
const cachePath = path.join(__dirname, 'CACHE')
|
const cachePath = path.join(__dirname, 'CACHE')
|
||||||
const tempPath = path.join(__dirname, 'TEMP')
|
const tempPath = path.join(__dirname, 'TEMP')
|
||||||
// Set temp and tool directories before importing (used to set global state)
|
// Set temp and tool directories before importing (used to set global state)
|
||||||
process.env['RUNNER_TEMPDIRECTORY'] = tempPath
|
process.env['RUNNER_TEMP'] = tempPath
|
||||||
process.env['RUNNER_TOOLSDIRECTORY'] = cachePath
|
process.env['RUNNER_TOOL_CACHE'] = cachePath
|
||||||
|
|
||||||
// eslint-disable-next-line import/first
|
// eslint-disable-next-line import/first
|
||||||
import * as tc from '../src/tool-cache'
|
import * as tc from '../src/tool-cache'
|
||||||
|
|
|
@ -21,8 +21,8 @@ const IS_WINDOWS = process.platform === 'win32'
|
||||||
const userAgent = 'actions/tool-cache'
|
const userAgent = 'actions/tool-cache'
|
||||||
|
|
||||||
// On load grab temp directory and cache directory and remove them from env (currently don't want to expose this)
|
// On load grab temp directory and cache directory and remove them from env (currently don't want to expose this)
|
||||||
let tempDirectory: string = process.env['RUNNER_TEMPDIRECTORY'] || ''
|
let tempDirectory: string = process.env['RUNNER_TEMP'] || ''
|
||||||
let cacheRoot: string = process.env['RUNNER_TOOLSDIRECTORY'] || ''
|
let cacheRoot: string = process.env['RUNNER_TOOL_CACHE'] || ''
|
||||||
// If directories not found, place them in common temp locations
|
// If directories not found, place them in common temp locations
|
||||||
if (!tempDirectory || !cacheRoot) {
|
if (!tempDirectory || !cacheRoot) {
|
||||||
let baseLocation: string
|
let baseLocation: string
|
||||||
|
|
Loading…
Reference in New Issue