diff --git a/dist/index.js b/dist/index.js index 65b3e1a..4c56564 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6634,12 +6634,15 @@ var __importStar = (this && this.__importStar) || function (mod) { Object.defineProperty(exports, "__esModule", { value: true }); const core = __importStar(__webpack_require__(470)); const artifact = __importStar(__webpack_require__(214)); +const path_1 = __webpack_require__(622); const constants_1 = __webpack_require__(694); function run() { return __awaiter(this, void 0, void 0, function* () { try { const name = core.getInput(constants_1.Inputs.Name, { required: false }); const path = core.getInput(constants_1.Inputs.Path, { required: false }); + const testing = path_1.resolve(path); + core.info(`Will tilde expansion work... ${testing}`); const artifactClient = artifact.create(); if (!name) { // download all artifacts @@ -6661,7 +6664,7 @@ function run() { core.info(`Artifact ${downloadResponse.artifactName} was downloaded to ${downloadResponse.downloadPath}`); } // output the directory that the artifact(s) was/were downloaded to - core.setOutput(constants_1.Outputs.DownloadPath, path); + core.setOutput(constants_1.Outputs.DownloadPath, path_1.resolve(path)); core.info('Artifact download has finished successfully'); } catch (err) { diff --git a/package-lock.json b/package-lock.json index a5d09df..7fcb57e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -184,6 +184,12 @@ "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==", "dev": true }, + "@types/node": { + "version": "14.0.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.22.tgz", + "integrity": "sha512-emeGcJvdiZ4Z3ohbmw93E/64jRzUHAItSHt8nF7M4TGgQTiWqFVGB8KNpLGFmUHmHLvjvBgFwVlqNcq+VuGv9g==", + "dev": true + }, "@types/normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", diff --git a/package.json b/package.json index 05a8d2d..d2211db 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "devDependencies": { "@actions/artifact": "^0.3.1", "@actions/core": "^1.2.4", + "@types/node": "^14.0.22", "@typescript-eslint/parser": "^2.30.0", "@zeit/ncc": "^0.22.1", "concurrently": "^5.2.0", diff --git a/src/download-artifact.ts b/src/download-artifact.ts index a421cfb..e01cc45 100644 --- a/src/download-artifact.ts +++ b/src/download-artifact.ts @@ -1,5 +1,6 @@ import * as core from '@actions/core' import * as artifact from '@actions/artifact' +import {resolve} from 'path' import {Inputs, Outputs} from './constants' async function run(): Promise { @@ -7,6 +8,9 @@ async function run(): Promise { const name = core.getInput(Inputs.Name, {required: false}) const path = core.getInput(Inputs.Path, {required: false}) + const testing = resolve(path) + core.info(`Will tilde expansion work... ${testing}`) + const artifactClient = artifact.create() if (!name) { // download all artifacts @@ -37,7 +41,7 @@ async function run(): Promise { ) } // output the directory that the artifact(s) was/were downloaded to - core.setOutput(Outputs.DownloadPath, path) + core.setOutput(Outputs.DownloadPath, resolve(path)) core.info('Artifact download has finished successfully') } catch (err) { core.setFailed(err.message)