diff --git a/package-lock.json b/package-lock.json index 1df8ee9..ddd87ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@actions/io", - "version": "1.1.3", + "version": "2.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@actions/io", - "version": "1.1.3", + "version": "2.0.0", "license": "MIT" } } diff --git a/package.json b/package.json index e8c8d8f..f0be120 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@actions/io", - "version": "1.1.3", + "version": "2.0.0", "description": "Actions io lib", "keywords": [ "github", diff --git a/src/io-util.ts b/src/io-util.ts index 67bae80..7cd42b8 100644 --- a/src/io-util.ts +++ b/src/io-util.ts @@ -28,7 +28,8 @@ export async function readlink(fsPath: string): Promise { // Only on Windows, ensure directory symlinks end with a backslash if (IS_WINDOWS) { try { - const stats = await fs.promises.lstat(result) + // Use stat on the target to check if it's a directory (result is already resolved) + const stats = await fs.promises.stat(result) if (stats.isDirectory() && !result.endsWith('\\')) { return `${result}\\` }