mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-27 00:48:28 +02:00
set path correctly
Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
This commit is contained in:
parent
b6f5f11fd5
commit
5a1313076c
2 changed files with 6 additions and 6 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
@ -31175,7 +31175,7 @@ function run() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const localKey = fileObject.Key.replace(s3Prefix, '');
|
const localKey = fileObject.Key.replace(s3Prefix, '');
|
||||||
core.info(`Downloading ${localKey}`);
|
core.info(`Started download: ${localKey}`);
|
||||||
core.debug(`S3 download uri: s3://${s3Bucket}/${fileObject.Key}`);
|
core.debug(`S3 download uri: s3://${s3Bucket}/${fileObject.Key}`);
|
||||||
s3.getObject({ Bucket: s3Bucket, Key: fileObject.Key }, function (err, fileContents) {
|
s3.getObject({ Bucket: s3Bucket, Key: fileObject.Key }, function (err, fileContents) {
|
||||||
var _a;
|
var _a;
|
||||||
|
@ -31183,8 +31183,8 @@ function run() {
|
||||||
core.error(`Error downloading ${localKey}`);
|
core.error(`Error downloading ${localKey}`);
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
fs.writeFileSync(path_1.default.resolve(resolvedPath, localKey), (_a = fileContents.Body) === null || _a === void 0 ? void 0 : _a.toString());
|
fs.writeFileSync(path_1.default.join(resolvedPath, localKey), (_a = fileContents.Body) === null || _a === void 0 ? void 0 : _a.toString());
|
||||||
core.info(`DONE: ${localKey}`);
|
core.info(`Done: ${localKey}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -33,7 +33,7 @@ async function run(): Promise<void> {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
const localKey = fileObject.Key.replace(s3Prefix, '')
|
const localKey = fileObject.Key.replace(s3Prefix, '')
|
||||||
core.info(`Downloading ${localKey}`)
|
core.info(`Started download: ${localKey}`)
|
||||||
core.debug(`S3 download uri: s3://${s3Bucket}/${fileObject.Key}`)
|
core.debug(`S3 download uri: s3://${s3Bucket}/${fileObject.Key}`)
|
||||||
s3.getObject({Bucket: s3Bucket, Key: fileObject.Key}, function (
|
s3.getObject({Bucket: s3Bucket, Key: fileObject.Key}, function (
|
||||||
err,
|
err,
|
||||||
|
@ -44,10 +44,10 @@ async function run(): Promise<void> {
|
||||||
throw err
|
throw err
|
||||||
}
|
}
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
path.resolve(resolvedPath, localKey),
|
path.join(resolvedPath, localKey),
|
||||||
fileContents.Body?.toString()
|
fileContents.Body?.toString()
|
||||||
)
|
)
|
||||||
core.info(`DONE: ${localKey}`)
|
core.info(`Done: ${localKey}`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue