Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2020-11-17 04:17:25 +0300
committerRuy Adorno <ruyadorno@hotmail.com>2020-11-17 22:38:17 +0300
commitbc9afb195f5aad7c06bc96049c0f00dc8e752dee (patch)
tree57f1631b485b4f303146f3fc1ae8306c0be35862 /tap-snapshots
parent4e522fdc917bc85af2ca8ff7669a0178e2f35123 (diff)
Preserve builtin conf when installing npm globally
When a file named 'npmrc' is in the root of the npm module that is currently running, it adds config values that override the defaults (but not the global or user configs). This is a way for a system package installer to tell the npm that it installs to put its globals somewhere other than the default. In order to keep these configs around when users self-update npm with `npm i -g npm`, these config values must be "sticky", and ride along into the newly globally installed npm. This commit restores this behavior, fixing self-updating npm for Windows users, and any other systems that may make use of this functionality. Fixes: #2002 PR-URL: https://github.com/npm/cli/pull/2184 Credit: @isaacs Close: #2184 Reviewed-by: @ruyadorno
Diffstat (limited to 'tap-snapshots')
-rw-r--r--tap-snapshots/test-lib-utils-reify-finish.js-TAP.test.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/tap-snapshots/test-lib-utils-reify-finish.js-TAP.test.js b/tap-snapshots/test-lib-utils-reify-finish.js-TAP.test.js
new file mode 100644
index 000000000..a82905a39
--- /dev/null
+++ b/tap-snapshots/test-lib-utils-reify-finish.js-TAP.test.js
@@ -0,0 +1,15 @@
+/* IMPORTANT
+ * This snapshot file is auto-generated, but designed for humans.
+ * It should be checked into source control and tracked carefully.
+ * Re-generate by setting TAP_SNAPSHOT=1 and running tests.
+ * Make sure to inspect the output below. Do not ignore changes!
+ */
+'use strict'
+exports[`test/lib/utils/reify-finish.js TAP should write if everything above passes > written config 1`] = `
+hasBuiltinConfig=true
+x=y
+
+[nested]
+foo=bar
+
+`