mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-22 10:29:06 +08:00
other path method
This commit is contained in:
parent
bf8696f8ed
commit
9e67f6e707
@ -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`)
|
||||
|
Loading…
x
Reference in New Issue
Block a user