Skip to content

Commit ad23932

Browse files
fix: only create npmrc if NPM_CONFIG_USERCONFIG is not set
1 parent 8cad036 commit ad23932

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/update/package_json.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func packageJson(newVersion string, file *os.File) error {
4848
}
4949

5050
npmrcPath := path.Join(path.Dir(file.Name()), ".npmrc")
51-
if _, err = os.Stat(npmrcPath); os.IsNotExist(err) {
51+
if _, err = os.Stat(npmrcPath); os.IsNotExist(err) && os.Getenv("NPM_CONFIG_USERCONFIG") == "" {
5252
return ioutil.WriteFile(npmrcPath, []byte(npmrc), 0644)
5353
}
5454
return err

0 commit comments

Comments
 (0)