Remove untildify

This commit is contained in:
Nick Cipollo
2025-12-02 08:29:48 -05:00
parent 23d2cc4c27
commit be9a4fac3a
9 changed files with 74 additions and 54 deletions

View File

@@ -1,7 +1,7 @@
import * as core from "@actions/core"
import { Globber, FileGlobber } from "./Globber"
import { Artifact } from "./Artifact"
import untildify from "untildify"
import { expandTilde } from "./PathExpander"
import { ArtifactPathValidator } from "./ArtifactPathValidator"
import { PathNormalizer } from "./PathNormalizer"
@@ -55,6 +55,6 @@ export class FileArtifactGlobber implements ArtifactGlobber {
}
private static expandPath(path: string): string {
return untildify(path)
return expandTilde(path)
}
}

6
src/PathExpander.ts Normal file
View File

@@ -0,0 +1,6 @@
import os from "os"
export function expandTilde(path: string): string {
return path.replace(/^~(?=$|\/|\\)/, os.homedir())
}