From 5218a837228e088d1667e8bfdd2a9be78e785690 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Tue, 30 Jul 2019 12:31:36 -0400 Subject: [PATCH] Check the right variables (#35) --- packages/tool-cache/__tests__/tool-cache.test.ts | 4 ++-- packages/tool-cache/src/tool-cache.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/tool-cache/__tests__/tool-cache.test.ts b/packages/tool-cache/__tests__/tool-cache.test.ts index cc8abc79..c1fb9e8f 100644 --- a/packages/tool-cache/__tests__/tool-cache.test.ts +++ b/packages/tool-cache/__tests__/tool-cache.test.ts @@ -7,8 +7,8 @@ import * as exec from '@actions/exec' const cachePath = path.join(__dirname, 'CACHE') const tempPath = path.join(__dirname, 'TEMP') // Set temp and tool directories before importing (used to set global state) -process.env['RUNNER_TEMPDIRECTORY'] = tempPath -process.env['RUNNER_TOOLSDIRECTORY'] = cachePath +process.env['RUNNER_TEMP'] = tempPath +process.env['RUNNER_TOOL_CACHE'] = cachePath // eslint-disable-next-line import/first import * as tc from '../src/tool-cache' diff --git a/packages/tool-cache/src/tool-cache.ts b/packages/tool-cache/src/tool-cache.ts index 5b4010bf..a25cdcee 100644 --- a/packages/tool-cache/src/tool-cache.ts +++ b/packages/tool-cache/src/tool-cache.ts @@ -21,8 +21,8 @@ const IS_WINDOWS = process.platform === 'win32' 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) -let tempDirectory: string = process.env['RUNNER_TEMPDIRECTORY'] || '' -let cacheRoot: string = process.env['RUNNER_TOOLSDIRECTORY'] || '' +let tempDirectory: string = process.env['RUNNER_TEMP'] || '' +let cacheRoot: string = process.env['RUNNER_TOOL_CACHE'] || '' // If directories not found, place them in common temp locations if (!tempDirectory || !cacheRoot) { let baseLocation: string