mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-19 21:18:22 +02:00
fix: make bun resolve to given file path when an absolute path is given (#114)
* Make bun resolve to single file path when an absolute path is given * Update test not to use the workspace folder
This commit is contained in:
parent
8f1bc2eeb3
commit
f09eb1edd0
2 changed files with 6 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
import { debug, warning } from "@actions/core";
|
||||
import { info } from "node:console";
|
||||
import { existsSync, readFileSync, renameSync } from "node:fs";
|
||||
import { join, basename } from "node:path";
|
||||
import { resolve, basename } from "node:path";
|
||||
|
||||
export function retry<T>(
|
||||
fn: () => Promise<T>,
|
||||
|
@ -48,7 +48,7 @@ export function readVersionFromFile(file: string): string | undefined {
|
|||
|
||||
debug(`Reading version from ${file}`);
|
||||
|
||||
const path = join(cwd, file);
|
||||
const path = resolve(cwd, file);
|
||||
const base = basename(file);
|
||||
|
||||
if (!existsSync(path)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue