mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-01 17:13:22 +08:00
properly resolve relative symlinks
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import * as stream from 'stream'
|
||||
import {readlink} from 'fs/promises'
|
||||
import {realpath} from 'fs/promises'
|
||||
import * as archiver from 'archiver'
|
||||
import * as core from '@actions/core'
|
||||
import {UploadZipSpecification} from './upload-zip-specification'
|
||||
@@ -46,7 +46,7 @@ export async function createZipUploadStream(
|
||||
// Check if symlink and resolve the source path
|
||||
let sourcePath = file.sourcePath
|
||||
if (file.stats.isSymbolicLink()) {
|
||||
sourcePath = await readlink(file.sourcePath)
|
||||
sourcePath = await realpath(file.sourcePath)
|
||||
}
|
||||
|
||||
// Add the file to the zip
|
||||
|
||||
Reference in New Issue
Block a user