mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-27 08:58:28 +02:00
Only replace tilde in certain scenarios
This commit is contained in:
parent
0bc4c5f195
commit
23faf7dc6f
2 changed files with 14 additions and 5 deletions
9
dist/index.js
vendored
9
dist/index.js
vendored
|
@ -6642,8 +6642,13 @@ function run() {
|
|||
try {
|
||||
const name = core.getInput(constants_1.Inputs.Name, { required: false });
|
||||
const path = core.getInput(constants_1.Inputs.Path, { required: false });
|
||||
// resolve tilde expansion
|
||||
const resolvedPath = path_1.resolve(path.replace('~', os.homedir));
|
||||
let resolvedPath;
|
||||
if (path === '~' || path.startsWith(`~${path_1.sep}`)) {
|
||||
resolvedPath = path_1.resolve(path.replace('~', os.homedir()));
|
||||
}
|
||||
else {
|
||||
resolvedPath = path_1.resolve(path);
|
||||
}
|
||||
core.debug(`Resolved path is ${resolvedPath}`);
|
||||
const artifactClient = artifact.create();
|
||||
if (!name) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue