From 39be9d4ef1a35079e1f4cd8a33163502afddea40 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Mon, 13 Jun 2022 15:43:31 -0500 Subject: [PATCH] Remove `@actions/io` --- index.js | 5 ++--- package-lock.json | 1 - package.json | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 0a8caa5..5f1ec8d 100644 --- a/index.js +++ b/index.js @@ -5,7 +5,6 @@ const io = require("@actions/io"); const retry = require("async-retry"); const semver = require("semver"); const tc = require("@actions/tool-cache"); -const { relative } = require("path"); const NEXTFLOW_REPO = { owner: "nextflow-io", repo: "nextflow" }; @@ -91,7 +90,7 @@ async function install_nextflow(url, version) { const temp_install_dir = fs.mkdtempSync(`nxf-${version}`); const nf_path = `${temp_install_dir}/nextflow`; - io.mv(nf_dl_path, nf_path); + fs.renameSync(nf_dl_path, nf_path); fs.chmodSync(nf_path, "0711"); return temp_install_dir; @@ -153,7 +152,7 @@ async function run() { ); core.debug(`Added Nextflow to cache: ${nf_path}`); - io.rmRF(nf_install_path); + fs.rmdirSync(nf_install_path, { recursive: true }); } else { core.debug(`Using cached version of Nextflow: ${nf_path}`); } diff --git a/package-lock.json b/package-lock.json index d5bbc45..faf89ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,6 @@ "dependencies": { "@actions/core": "^1.8.2", "@actions/github": "^5.0.3", - "@actions/io": "^1.1.2", "@actions/tool-cache": "^2.0.1", "async-retry": "^1.3.3", "semver": "^7.3.7" diff --git a/package.json b/package.json index 934a0c9..8686df6 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ "dependencies": { "@actions/core": "^1.8.2", "@actions/github": "^5.0.3", - "@actions/io": "^1.1.2", "@actions/tool-cache": "^2.0.1", "async-retry": "^1.3.3", "semver": "^7.3.7"