mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-26 00:18:30 +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 chosenPath = core.getInput(constants_1.Inputs.Path, { 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
|
||||
if (chosenPath.startsWith(`~`)) {
|
||||
path_1.default.resolve();
|
||||
|
|
|
@ -13,7 +13,7 @@ async function run(): Promise<void> {
|
|||
const chosenPath = core.getInput(Inputs.Path, {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
|
||||
if (chosenPath.startsWith(`~`)) {
|
||||
path.resolve()
|
||||
|
@ -34,19 +34,19 @@ async function run(): Promise<void> {
|
|||
continue
|
||||
}
|
||||
core.info(`Grabbing ${fileObject.Key}`)
|
||||
s3.getObject({Bucket: s3Bucket, Key: fileObject.Key}, function (
|
||||
err,
|
||||
fileContents
|
||||
) {
|
||||
if (err) {
|
||||
core.error(err)
|
||||
throw err
|
||||
s3.getObject(
|
||||
{Bucket: s3Bucket, Key: fileObject.Key},
|
||||
function (err, fileContents) {
|
||||
if (err) {
|
||||
core.error(err)
|
||||
throw err
|
||||
}
|
||||
fs.writeFileSync(
|
||||
path.resolve(resolvedPath, fileObject.Key as string),
|
||||
fileContents.Body?.toString()
|
||||
)
|
||||
}
|
||||
fs.writeFileSync(
|
||||
path.resolve(resolvedPath, fileObject.Key as string),
|
||||
fileContents.Body?.toString()
|
||||
)
|
||||
})
|
||||
)
|
||||
}
|
||||
})
|
||||
// output the directory that the artifact(s) was/were downloaded to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue