1
0
Fork 0
mirror of https://github.com/docker/login-action.git synced 2025-04-27 17:16:35 +02:00

dev: switch to eslint

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2022-03-21 10:57:36 +01:00
parent 56f72fcef0
commit 0828e0e718
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
16 changed files with 10227 additions and 32445 deletions

View file

@ -34,7 +34,7 @@ export const getAccountIDs = (registry: string): string[] => {
if (!matches) {
return [];
}
let accountIDs: Array<string> = [matches[2]];
const accountIDs: Array<string> = [matches[2]];
if (process.env.AWS_ACCOUNT_IDS) {
accountIDs.push(...process.env.AWS_ACCOUNT_IDS.split(','));
}
@ -57,14 +57,14 @@ export const getRegistriesData = async (registry: string, username?: string, pas
authTokenRequest['registryIds'] = accountIDs;
}
let httpProxyAgent: any = null;
let httpProxyAgent;
const httpProxy = process.env.http_proxy || process.env.HTTP_PROXY || '';
if (httpProxy) {
core.debug(`Using http proxy ${httpProxy}`);
httpProxyAgent = new HttpProxyAgent(httpProxy);
}
let httpsProxyAgent: any = null;
let httpsProxyAgent;
const httpsProxy = process.env.https_proxy || process.env.HTTPS_PROXY || '';
if (httpsProxy) {
core.debug(`Using https proxy ${httpsProxy}`);

View file

@ -27,7 +27,7 @@ export async function loginStandard(registry: string, username: string, password
throw new Error('Username and password required');
}
let loginArgs: Array<string> = ['login', '--password-stdin'];
const loginArgs: Array<string> = ['login', '--password-stdin'];
loginArgs.push('--username', username);
loginArgs.push(registry);

View file

@ -9,7 +9,7 @@ export async function run(): Promise<void> {
stateHelper.setRegistry(input.registry);
stateHelper.setLogout(input.logout);
await docker.login(input.registry, input.username, input.password, input.ecr);
} catch (error: any) {
} catch (error) {
core.setFailed(error.message);
}
}