mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-27 08:58:28 +02:00
Fix
This commit is contained in:
parent
23faf7dc6f
commit
49b7a3bcdf
2 changed files with 5 additions and 3 deletions
3
dist/index.js
vendored
3
dist/index.js
vendored
|
@ -6643,7 +6643,8 @@ function run() {
|
|||
const name = core.getInput(constants_1.Inputs.Name, { required: false });
|
||||
const path = core.getInput(constants_1.Inputs.Path, { required: false });
|
||||
let resolvedPath;
|
||||
if (path === '~' || path.startsWith(`~${path_1.sep}`)) {
|
||||
// resolve tilde expansions, path.replace only replaces the first occurrence of a pattern
|
||||
if (path.startsWith(`~`)) {
|
||||
resolvedPath = path_1.resolve(path.replace('~', os.homedir()));
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as core from '@actions/core'
|
||||
import * as artifact from '@actions/artifact'
|
||||
import * as os from 'os'
|
||||
import {resolve, sep} from 'path'
|
||||
import {resolve} from 'path'
|
||||
import {Inputs, Outputs} from './constants'
|
||||
|
||||
async function run(): Promise<void> {
|
||||
|
@ -10,7 +10,8 @@ async function run(): Promise<void> {
|
|||
const path = core.getInput(Inputs.Path, {required: false})
|
||||
|
||||
let resolvedPath
|
||||
if (path === '~' || path.startsWith(`~${sep}`)) {
|
||||
// resolve tilde expansions, path.replace only replaces the first occurrence of a pattern
|
||||
if (path.startsWith(`~`)) {
|
||||
resolvedPath = resolve(path.replace('~', os.homedir()))
|
||||
} else {
|
||||
resolvedPath = resolve(path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue