Skip to content

Commit

Permalink
fix: use stat instead of lstat (#1190)
Browse files Browse the repository at this point in the history
  • Loading branch information
jun-sheaf committed Jan 6, 2023
1 parent 2c09aae commit 411e8fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/artifact/src/internal/upload-specification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function getUploadSpecification(
if (!fs.existsSync(rootDirectory)) {
throw new Error(`Provided rootDirectory ${rootDirectory} does not exist`)
}
if (!fs.lstatSync(rootDirectory).isDirectory()) {
if (!fs.statSync(rootDirectory).isDirectory()) {
throw new Error(
`Provided rootDirectory ${rootDirectory} is not a valid directory`
)
Expand Down Expand Up @@ -57,7 +57,7 @@ export function getUploadSpecification(
if (!fs.existsSync(file)) {
throw new Error(`File ${file} does not exist`)
}
if (!fs.lstatSync(file).isDirectory()) {
if (!fs.statSync(file).isDirectory()) {
// Normalize and resolve, this allows for either absolute or relative paths to be used
file = normalize(file)
file = resolve(file)
Expand Down

0 comments on commit 411e8fa

Please sign in to comment.