Skip to content

Commit

Permalink
fix: crash on non-string npmrc configs
Browse files Browse the repository at this point in the history
  • Loading branch information
gabidobo committed Apr 24, 2023
1 parent 66867cc commit ab49e97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let registriesInfo = [];
let fetch = () => {};

const replaceEnvVars = (str) =>
str.replace(/\${([^}]+)}/g, (match, variableName) => process.env[variableName] || '');
str?.replace?.(/\${([^}]+)}/g, (match, variableName) => process.env[variableName] || '') || str;

const getRegistriesInfo = (appPath) => {
const configs = loadNpmConfigs(appPath);
Expand Down

0 comments on commit ab49e97

Please sign in to comment.