mirror of
https://github.com/actions/setup-node
synced 2025-04-10 02:45:50 +00:00
add more logging to debug
This commit is contained in:
parent
e64e8b870d
commit
57b2563e28
2 changed files with 4 additions and 2 deletions
3
dist/index.js
vendored
3
dist/index.js
vendored
|
@ -4776,7 +4776,7 @@ function writeRegistryToFile(registryUrl, fileLocation, alwaysAuth) {
|
|||
? `${scope}:registry=${registryUrl}`
|
||||
: `registry=${registryUrl}`;
|
||||
const alwaysAuthString = `always-auth=${alwaysAuth}`;
|
||||
if (scope && includeBothRegistries) {
|
||||
if (scope && includeBothRegistries === "true") {
|
||||
const registryStringNoScope = `registry=${registryUrl}`;
|
||||
newContents += `${authString}${os.EOL}${registryString}${os.EOL}${registryStringNoScope}${os.EOL}${alwaysAuthString}`;
|
||||
}
|
||||
|
@ -4786,6 +4786,7 @@ function writeRegistryToFile(registryUrl, fileLocation, alwaysAuth) {
|
|||
console.log(newContents);
|
||||
fs.writeFileSync(fileLocation, newContents);
|
||||
core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
|
||||
console.log(nodeAuthToken);
|
||||
if (defaultNodeAuthToken !== nodeAuthToken) {
|
||||
core.exportVariable('NODE_AUTH_TOKEN', nodeAuthToken);
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ async function writeRegistryToFile(
|
|||
: `registry=${registryUrl}`;
|
||||
|
||||
const alwaysAuthString: string = `always-auth=${alwaysAuth}`;
|
||||
if(scope && includeBothRegistries) {
|
||||
if(scope && includeBothRegistries === "true") {
|
||||
const registryStringNoScope = `registry=${registryUrl}`;
|
||||
newContents += `${authString}${os.EOL}${registryString}${os.EOL}${registryStringNoScope}${os.EOL}${alwaysAuthString}`;
|
||||
} else {
|
||||
|
@ -110,6 +110,7 @@ async function writeRegistryToFile(
|
|||
console.log(newContents);
|
||||
fs.writeFileSync(fileLocation, newContents);
|
||||
core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
|
||||
console.log(nodeAuthToken);
|
||||
if (defaultNodeAuthToken !== nodeAuthToken) {
|
||||
core.exportVariable('NODE_AUTH_TOKEN', nodeAuthToken)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue