From 9585d5068fadfc0989c3046962575da13ae44e72 Mon Sep 17 00:00:00 2001 From: Stephen Carter Date: Thu, 6 Apr 2023 15:19:19 +0100 Subject: [PATCH 1/2] Copy the file and remove the original --- src/download.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/download.ts b/src/download.ts index 5a9267b..a621f2e 100644 --- a/src/download.ts +++ b/src/download.ts @@ -1,6 +1,6 @@ import {addPath} from '@actions/core' import {exec} from '@actions/exec' -import {mkdirP, mv} from '@actions/io' +import {mkdirP, cp, rmRF} from '@actions/io' import {downloadTool} from '@actions/tool-cache' import {platform as getPlatform} from 'os' import {join} from 'path' @@ -26,6 +26,7 @@ export const downloadMinikube = async (version: string): Promise => { getPlatform() === 'darwin' ? '/Users/runner/bin' : '/home/runner/bin' await mkdirP(binPath) await exec('chmod', ['+x', downloadPath]) - await mv(downloadPath, join(binPath, 'minikube')) + await cp(downloadPath, join(binPath, 'minikube')) + await rmRF(downloadPath) addPath(binPath) } From 5d9b9bf939d118a48975b7b733530f17f55f2e65 Mon Sep 17 00:00:00 2001 From: Stephen Carter Date: Fri, 7 Apr 2023 11:09:06 +0100 Subject: [PATCH 2/2] Add compiled index.js --- dist/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index b0c163b..47ddd7a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -145,7 +145,8 @@ const downloadMinikube = (version) => __awaiter(void 0, void 0, void 0, function const binPath = (0, os_1.platform)() === 'darwin' ? '/Users/runner/bin' : '/home/runner/bin'; yield (0, io_1.mkdirP)(binPath); yield (0, exec_1.exec)('chmod', ['+x', downloadPath]); - yield (0, io_1.mv)(downloadPath, (0, path_1.join)(binPath, 'minikube')); + yield (0, io_1.cp)(downloadPath, (0, path_1.join)(binPath, 'minikube')); + yield (0, io_1.rmRF)(downloadPath); (0, core_1.addPath)(binPath); }); exports.downloadMinikube = downloadMinikube;