WIP just debugging nevermind me
This commit is contained in:
parent
8f7456f6ed
commit
a07b2ee339
@ -45,6 +45,13 @@ module.exports = async ({cwd, env, options: {repositoryUrl, branch}}) => {
|
|||||||
const envVar = Object.keys(GIT_TOKENS).find(envVar => !isNil(env[envVar]));
|
const envVar = Object.keys(GIT_TOKENS).find(envVar => !isNil(env[envVar]));
|
||||||
const gitCredentials = `${GIT_TOKENS[envVar] || ''}${env[envVar] || ''}`;
|
const gitCredentials = `${GIT_TOKENS[envVar] || ''}${env[envVar] || ''}`;
|
||||||
|
|
||||||
|
console.log(`-------- envVar -------- `);
|
||||||
|
console.log(envVar);
|
||||||
|
console.log(`-------- GIT_TOKENS[envVar] -------- `);
|
||||||
|
console.log(GIT_TOKENS[envVar]);
|
||||||
|
console.log(`-------- env[envVar].substr(5) -------- `);
|
||||||
|
console.log((env[envVar] || '').substr(5));
|
||||||
|
|
||||||
if (gitCredentials) {
|
if (gitCredentials) {
|
||||||
// If credentials are set via environment variables, convert the URL to http/https and add basic auth, otherwise return `repositoryUrl` as is
|
// If credentials are set via environment variables, convert the URL to http/https and add basic auth, otherwise return `repositoryUrl` as is
|
||||||
const [match, auth, host, path] = /^(?!.+:\/\/)(?:(.*)@)?(.*?):(.*)$/.exec(repositoryUrl) || [];
|
const [match, auth, host, path] = /^(?!.+:\/\/)(?:(.*)@)?(.*?):(.*)$/.exec(repositoryUrl) || [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user