mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-27 00:48:28 +02:00
fix formatting
Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
This commit is contained in:
parent
91f3fe2635
commit
ed1916672d
2 changed files with 14 additions and 14 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
|
@ -31173,7 +31173,7 @@ function run() {
|
||||||
const name = core.getInput(constants_1.Inputs.Name, { required: false });
|
const name = core.getInput(constants_1.Inputs.Name, { required: false });
|
||||||
const chosenPath = core.getInput(constants_1.Inputs.Path, { required: false });
|
const chosenPath = core.getInput(constants_1.Inputs.Path, { required: false });
|
||||||
const s3Bucket = core.getInput(constants_1.Inputs.S3Bucket, { required: false });
|
const s3Bucket = core.getInput(constants_1.Inputs.S3Bucket, { required: false });
|
||||||
let resolvedPath = "";
|
let resolvedPath = '';
|
||||||
// resolve tilde expansions, path.replace only replaces the first occurrence of a pattern
|
// resolve tilde expansions, path.replace only replaces the first occurrence of a pattern
|
||||||
if (chosenPath.startsWith(`~`)) {
|
if (chosenPath.startsWith(`~`)) {
|
||||||
path_1.default.resolve();
|
path_1.default.resolve();
|
||||||
|
|
|
@ -13,7 +13,7 @@ async function run(): Promise<void> {
|
||||||
const chosenPath = core.getInput(Inputs.Path, {required: false})
|
const chosenPath = core.getInput(Inputs.Path, {required: false})
|
||||||
const s3Bucket = core.getInput(Inputs.S3Bucket, {required: false})
|
const s3Bucket = core.getInput(Inputs.S3Bucket, {required: false})
|
||||||
|
|
||||||
let resolvedPath = "";
|
let resolvedPath = ''
|
||||||
// resolve tilde expansions, path.replace only replaces the first occurrence of a pattern
|
// resolve tilde expansions, path.replace only replaces the first occurrence of a pattern
|
||||||
if (chosenPath.startsWith(`~`)) {
|
if (chosenPath.startsWith(`~`)) {
|
||||||
path.resolve()
|
path.resolve()
|
||||||
|
@ -34,10 +34,9 @@ async function run(): Promise<void> {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
core.info(`Grabbing ${fileObject.Key}`)
|
core.info(`Grabbing ${fileObject.Key}`)
|
||||||
s3.getObject({Bucket: s3Bucket, Key: fileObject.Key}, function (
|
s3.getObject(
|
||||||
err,
|
{Bucket: s3Bucket, Key: fileObject.Key},
|
||||||
fileContents
|
function (err, fileContents) {
|
||||||
) {
|
|
||||||
if (err) {
|
if (err) {
|
||||||
core.error(err)
|
core.error(err)
|
||||||
throw err
|
throw err
|
||||||
|
@ -46,7 +45,8 @@ async function run(): Promise<void> {
|
||||||
path.resolve(resolvedPath, fileObject.Key as string),
|
path.resolve(resolvedPath, fileObject.Key as string),
|
||||||
fileContents.Body?.toString()
|
fileContents.Body?.toString()
|
||||||
)
|
)
|
||||||
})
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// output the directory that the artifact(s) was/were downloaded to
|
// output the directory that the artifact(s) was/were downloaded to
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue