mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-09-05 19:46:55 +00:00
committed by
GitHub
parent
26cf676705
commit
1b46e13ec8
@ -116,16 +116,15 @@ function expandTilde(input: string): string {
|
||||
}
|
||||
|
||||
function resolveRelativePath(inputPath: string): string {
|
||||
if (path.isAbsolute(inputPath)) {
|
||||
return inputPath;
|
||||
}
|
||||
let absolutePath = inputPath;
|
||||
if (absolutePath.startsWith("./")) {
|
||||
absolutePath = absolutePath.substring(2);
|
||||
}
|
||||
absolutePath = `${workingDirectory}${path.sep}${absolutePath}`;
|
||||
core.debug(`Resolving relative path ${inputPath} to ${absolutePath}`);
|
||||
return absolutePath;
|
||||
const hasNegation = inputPath.startsWith("!");
|
||||
const pathWithoutNegation = hasNegation ? inputPath.substring(1) : inputPath;
|
||||
|
||||
const resolvedPath = path.resolve(workingDirectory, pathWithoutNegation);
|
||||
|
||||
core.debug(
|
||||
`Resolving relative path ${inputPath} to ${hasNegation ? "!" : ""}${resolvedPath}`,
|
||||
);
|
||||
return hasNegation ? `!${resolvedPath}` : resolvedPath;
|
||||
}
|
||||
|
||||
function getManifestFile(): string | undefined {
|
||||
|
Reference in New Issue
Block a user