Fix args for ossutil config
This commit is contained in:
15
dist/index.js
vendored
15
dist/index.js
vendored
@@ -4167,20 +4167,23 @@ function run() {
|
|||||||
yield installer.getOssutil(version);
|
yield installer.getOssutil(version);
|
||||||
core.info('ossutil is successfully installed');
|
core.info('ossutil is successfully installed');
|
||||||
// config
|
// config
|
||||||
const endpoint = core.getInput('endpoint');
|
const inputOptions = { required: true };
|
||||||
const accessKeyId = core.getInput('access-key-id');
|
const endpoint = core.getInput('endpoint', inputOptions);
|
||||||
const accessKeySecret = core.getInput('access-key-secret');
|
const accessKeyId = core.getInput('access-key-id', inputOptions);
|
||||||
|
const accessKeySecret = core.getInput('access-key-secret', inputOptions);
|
||||||
const stsToken = core.getInput('sts-token');
|
const stsToken = core.getInput('sts-token');
|
||||||
const args = [
|
const args = [
|
||||||
|
'config',
|
||||||
'--endpoint',
|
'--endpoint',
|
||||||
endpoint,
|
endpoint,
|
||||||
'--access-key-id',
|
'--access-key-id',
|
||||||
accessKeyId,
|
accessKeyId,
|
||||||
'--access-key-secret',
|
'--access-key-secret',
|
||||||
accessKeySecret,
|
accessKeySecret
|
||||||
'--sts-token',
|
|
||||||
stsToken
|
|
||||||
];
|
];
|
||||||
|
if (stsToken) {
|
||||||
|
args.push('--sts-token', stsToken);
|
||||||
|
}
|
||||||
const exitCode = yield exec.exec('ossutil', args);
|
const exitCode = yield exec.exec('ossutil', args);
|
||||||
if (exitCode === 0) {
|
if (exitCode === 0) {
|
||||||
core.info('ossutil config is done');
|
core.info('ossutil config is done');
|
||||||
|
|||||||
@@ -10,20 +10,23 @@ async function run(): Promise<void> {
|
|||||||
core.info('ossutil is successfully installed')
|
core.info('ossutil is successfully installed')
|
||||||
|
|
||||||
// config
|
// config
|
||||||
const endpoint = core.getInput('endpoint')
|
const inputOptions: core.InputOptions = {required: true}
|
||||||
const accessKeyId = core.getInput('access-key-id')
|
const endpoint = core.getInput('endpoint', inputOptions)
|
||||||
const accessKeySecret = core.getInput('access-key-secret')
|
const accessKeyId = core.getInput('access-key-id', inputOptions)
|
||||||
|
const accessKeySecret = core.getInput('access-key-secret', inputOptions)
|
||||||
const stsToken = core.getInput('sts-token')
|
const stsToken = core.getInput('sts-token')
|
||||||
const args = [
|
const args = [
|
||||||
|
'config',
|
||||||
'--endpoint',
|
'--endpoint',
|
||||||
endpoint,
|
endpoint,
|
||||||
'--access-key-id',
|
'--access-key-id',
|
||||||
accessKeyId,
|
accessKeyId,
|
||||||
'--access-key-secret',
|
'--access-key-secret',
|
||||||
accessKeySecret,
|
accessKeySecret
|
||||||
'--sts-token',
|
|
||||||
stsToken
|
|
||||||
]
|
]
|
||||||
|
if (stsToken) {
|
||||||
|
args.push('--sts-token', stsToken)
|
||||||
|
}
|
||||||
const exitCode = await exec.exec('ossutil', args)
|
const exitCode = await exec.exec('ossutil', args)
|
||||||
if (exitCode === 0) {
|
if (exitCode === 0) {
|
||||||
core.info('ossutil config is done')
|
core.info('ossutil config is done')
|
||||||
|
|||||||
Reference in New Issue
Block a user