From 9e67f6e7077b68c45fa7874dd6f95342cd73d164 Mon Sep 17 00:00:00 2001 From: John Sudol <24583161+johnsudol@users.noreply.github.com> Date: Mon, 19 Dec 2022 18:56:43 +0000 Subject: [PATCH] other path method --- packages/artifact/src/internal/upload-specification.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/artifact/src/internal/upload-specification.ts b/packages/artifact/src/internal/upload-specification.ts index 49d6142e..be0dea83 100644 --- a/packages/artifact/src/internal/upload-specification.ts +++ b/packages/artifact/src/internal/upload-specification.ts @@ -1,6 +1,6 @@ import * as fs from 'fs' import {debug} from '@actions/core' -import {join, normalize, resolve} from 'path' +import {join, normalize, resolve, toNamespacedPath} from 'path' import {checkArtifactFilePath} from './path-and-artifact-name-validation' export interface UploadSpecification { @@ -22,7 +22,7 @@ export function getUploadSpecification( // artifact name was checked earlier on, no need to check again const specifications: UploadSpecification[] = [] - const rootPath = resolve(rootDirectory) + const rootPath = toNamespacedPath(rootDirectory) if (!fs.existsSync(rootPath)) { throw new Error(`Provided rootDirectory ${rootPath} does not exist`)