mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
OPSEXP-2250 Fix s3 download command in init aps (#8842)
This commit is contained in:
parent
b58e6f628a
commit
a8be9d64e1
@ -435,17 +435,23 @@ async function authorizeUserToContentWithBasic(username: string, contentId: stri
|
||||
}
|
||||
|
||||
async function downloadLicenseFile(apsLicensePath: string) {
|
||||
try {
|
||||
spawnSync(` aws s3 cp ${apsLicensePath} ./ `, {
|
||||
const args = [
|
||||
`s3`,
|
||||
`cp`,
|
||||
apsLicensePath,
|
||||
`./`
|
||||
];
|
||||
const result = spawnSync(`aws`, args, {
|
||||
cwd: path.resolve(__dirname, `./`),
|
||||
shell: false
|
||||
});
|
||||
logger.info(`Aps license file download from S3 bucket`);
|
||||
return true;
|
||||
} catch (error) {
|
||||
logger.error(`Not able to download the APS license from S3 bucket` );
|
||||
|
||||
if (result.status !== 0) {
|
||||
logger.error(`Not able to download the APS license from S3 bucket.\nCommand aws ${args.join(' ')} - failed with:\n${result.output}`);
|
||||
return false;
|
||||
}
|
||||
logger.info(`Aps license file download from S3 bucket`);
|
||||
return true;
|
||||
}
|
||||
|
||||
function sleep(delay: number) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user