mirror of
https://github.com/actions/setup-node.git
synced 2025-04-22 09:21:00 +00:00
build code changes
This commit is contained in:
parent
9a13084841
commit
39ccff2929
2 changed files with 8 additions and 6 deletions
13
dist/index.js
vendored
13
dist/index.js
vendored
|
@ -4722,12 +4722,15 @@ function getAuthToken(authUrl, authUser, authPass) {
|
||||||
maxRetries: 3
|
maxRetries: 3
|
||||||
});
|
});
|
||||||
let response = yield httpClient.get(authUrl);
|
let response = yield httpClient.get(authUrl);
|
||||||
console.log(response);
|
/**
|
||||||
|
* constains string _auth = ***OmV5***\nalways-auth = true
|
||||||
|
* we will parse it by using indexes
|
||||||
|
*/
|
||||||
let body = yield response.readBody();
|
let body = yield response.readBody();
|
||||||
core.info(body);
|
const startIndex = body.indexOf('_auth') + 8;
|
||||||
let data = JSON.parse(body);
|
const endIndex = body.indexOf('\n');
|
||||||
core.info(JSON.stringify(data));
|
const authToken = body.substring(startIndex, endIndex);
|
||||||
return '';
|
return authToken;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function writeRegistryToFile(registryUrl, fileLocation, alwaysAuth) {
|
function writeRegistryToFile(registryUrl, fileLocation, alwaysAuth) {
|
||||||
|
|
|
@ -35,7 +35,6 @@ async function getAuthToken(
|
||||||
maxRetries: 3
|
maxRetries: 3
|
||||||
});
|
});
|
||||||
let response: hc.HttpClientResponse = await httpClient.get(authUrl);
|
let response: hc.HttpClientResponse = await httpClient.get(authUrl);
|
||||||
console.log(response);
|
|
||||||
/**
|
/**
|
||||||
* constains string _auth = ***OmV5***\nalways-auth = true
|
* constains string _auth = ***OmV5***\nalways-auth = true
|
||||||
* we will parse it by using indexes
|
* we will parse it by using indexes
|
||||||
|
|
Loading…
Add table
Reference in a new issue