mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-02-23 02:30:26 +08:00
fix: use copy instead of mv (#15)
* fix: use copy instead of mv * fix: path does not exist
This commit is contained in:
parent
4573031972
commit
67e559db2c
6
dist/setup.js
vendored
6
dist/setup.js
vendored
@ -5,7 +5,7 @@ import * as action from "@actions/core";
|
|||||||
import { downloadTool, extractZip } from "@actions/tool-cache";
|
import { downloadTool, extractZip } from "@actions/tool-cache";
|
||||||
import * as cache from "@actions/cache";
|
import * as cache from "@actions/cache";
|
||||||
import { restoreCache, saveCache } from "@actions/cache";
|
import { restoreCache, saveCache } from "@actions/cache";
|
||||||
import { mv } from "@actions/io";
|
import { cp, mkdirP, rmRF } from "@actions/io";
|
||||||
import { getExecOutput } from "@actions/exec";
|
import { getExecOutput } from "@actions/exec";
|
||||||
export default async (options) => {
|
export default async (options) => {
|
||||||
const { url, cacheKey } = getDownloadUrl(options);
|
const { url, cacheKey } = getDownloadUrl(options);
|
||||||
@ -33,7 +33,9 @@ export default async (options) => {
|
|||||||
const zipPath = await downloadTool(url);
|
const zipPath = await downloadTool(url);
|
||||||
const extractedPath = await extractZip(zipPath);
|
const extractedPath = await extractZip(zipPath);
|
||||||
const exePath = await extractBun(extractedPath);
|
const exePath = await extractBun(extractedPath);
|
||||||
await mv(exePath, path);
|
await mkdirP(dir);
|
||||||
|
await cp(exePath, path);
|
||||||
|
await rmRF(exePath);
|
||||||
version = await verifyBun(path);
|
version = await verifyBun(path);
|
||||||
}
|
}
|
||||||
if (!version) {
|
if (!version) {
|
||||||
|
@ -5,7 +5,7 @@ import * as action from "@actions/core";
|
|||||||
import { downloadTool, extractZip } from "@actions/tool-cache";
|
import { downloadTool, extractZip } from "@actions/tool-cache";
|
||||||
import * as cache from "@actions/cache";
|
import * as cache from "@actions/cache";
|
||||||
import { restoreCache, saveCache } from "@actions/cache";
|
import { restoreCache, saveCache } from "@actions/cache";
|
||||||
import { mv } from "@actions/io";
|
import { cp, mkdirP, rmRF } from "@actions/io";
|
||||||
import { getExecOutput } from "@actions/exec";
|
import { getExecOutput } from "@actions/exec";
|
||||||
|
|
||||||
export default async (options?: {
|
export default async (options?: {
|
||||||
@ -41,7 +41,9 @@ export default async (options?: {
|
|||||||
const zipPath = await downloadTool(url);
|
const zipPath = await downloadTool(url);
|
||||||
const extractedPath = await extractZip(zipPath);
|
const extractedPath = await extractZip(zipPath);
|
||||||
const exePath = await extractBun(extractedPath);
|
const exePath = await extractBun(extractedPath);
|
||||||
await mv(exePath, path);
|
await mkdirP(dir);
|
||||||
|
await cp(exePath, path);
|
||||||
|
await rmRF(exePath);
|
||||||
version = await verifyBun(path);
|
version = await verifyBun(path);
|
||||||
}
|
}
|
||||||
if (!version) {
|
if (!version) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user