fix: use copy instead of mv

This commit is contained in:
Nilesh Suthar 2023-09-07 15:38:51 +05:30
parent 4573031972
commit a3cfc7af9c
2 changed files with 6 additions and 4 deletions

5
dist/setup.js vendored
View file

@ -5,7 +5,7 @@ import * as action from "@actions/core";
import { downloadTool, extractZip } from "@actions/tool-cache";
import * as cache from "@actions/cache";
import { restoreCache, saveCache } from "@actions/cache";
import { mv } from "@actions/io";
import { cp, rmRF } from "@actions/io";
import { getExecOutput } from "@actions/exec";
export default async (options) => {
const { url, cacheKey } = getDownloadUrl(options);
@ -33,7 +33,8 @@ export default async (options) => {
const zipPath = await downloadTool(url);
const extractedPath = await extractZip(zipPath);
const exePath = await extractBun(extractedPath);
await mv(exePath, path);
await cp(exePath, path);
await rmRF(exePath);
version = await verifyBun(path);
}
if (!version) {

View file

@ -5,7 +5,7 @@ import * as action from "@actions/core";
import { downloadTool, extractZip } from "@actions/tool-cache";
import * as cache from "@actions/cache";
import { restoreCache, saveCache } from "@actions/cache";
import { mv } from "@actions/io";
import { cp, rmRF } from "@actions/io";
import { getExecOutput } from "@actions/exec";
export default async (options?: {
@ -41,7 +41,8 @@ export default async (options?: {
const zipPath = await downloadTool(url);
const extractedPath = await extractZip(zipPath);
const exePath = await extractBun(extractedPath);
await mv(exePath, path);
await cp(exePath, path);
await rmRF(exePath);
version = await verifyBun(path);
}
if (!version) {