fix formatting

Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
This commit is contained in:
Eli Uriegas 2021-05-18 11:15:30 -07:00
parent 91f3fe2635
commit ed1916672d
No known key found for this signature in database
GPG key ID: EE2C3B4893010973
2 changed files with 14 additions and 14 deletions

2
dist/index.js vendored
View file

@ -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();

View file

@ -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