Skip to content

Commit 069a4f8

Browse files
committed
Add dist
1 parent e77eaac commit 069a4f8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

dist/setup/index.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -72945,24 +72945,22 @@ function writeRegistryToFile(registryUrl, fileLocation, alwaysAuth) {
7294572945
scope = '@' + scope;
7294672946
}
7294772947
if (scope) {
72948-
scope = scope.toLowerCase();
72948+
scope = scope.toLowerCase() + ':';
7294972949
}
7295072950
core.debug(`Setting auth in ${fileLocation}`);
7295172951
let newContents = '';
7295272952
if (fs.existsSync(fileLocation)) {
7295372953
const curContents = fs.readFileSync(fileLocation, 'utf8');
7295472954
curContents.split(os.EOL).forEach((line) => {
7295572955
// Add current contents unless they are setting the registry
72956-
if (!line.toLowerCase().startsWith('registry')) {
72956+
if (!line.toLowerCase().startsWith(`${scope}registry`)) {
7295772957
newContents += line + os.EOL;
7295872958
}
7295972959
});
7296072960
}
7296172961
// Remove http: or https: from front of registry.
7296272962
const authString = registryUrl.replace(/(^\w+:|^)/, '') + ':_authToken=${NODE_AUTH_TOKEN}';
72963-
const registryString = scope
72964-
? `${scope}:registry=${registryUrl}`
72965-
: `registry=${registryUrl}`;
72963+
const registryString = `${scope}registry=${registryUrl}`;
7296672964
const alwaysAuthString = `always-auth=${alwaysAuth}`;
7296772965
newContents += `${authString}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}`;
7296872966
fs.writeFileSync(fileLocation, newContents);

0 commit comments

Comments
 (0)