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) {
|
async function downloadLicenseFile(apsLicensePath: string) {
|
||||||
try {
|
const args = [
|
||||||
spawnSync(` aws s3 cp ${apsLicensePath} ./ `, {
|
`s3`,
|
||||||
cwd: path.resolve(__dirname, `./`),
|
`cp`,
|
||||||
shell: false
|
apsLicensePath,
|
||||||
});
|
`./`
|
||||||
logger.info(`Aps license file download from S3 bucket`);
|
];
|
||||||
return true;
|
const result = spawnSync(`aws`, args, {
|
||||||
} catch (error) {
|
cwd: path.resolve(__dirname, `./`),
|
||||||
logger.error(`Not able to download the APS license from S3 bucket` );
|
shell: false
|
||||||
|
});
|
||||||
|
|
||||||
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
logger.info(`Aps license file download from S3 bucket`);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sleep(delay: number) {
|
function sleep(delay: number) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user