From 2e417de91dfc1413073f51374df854a2ea126649 Mon Sep 17 00:00:00 2001 From: Garrett Honeycutt Date: Thu, 21 Apr 2016 11:30:21 -0400 Subject: [PATCH] Document NPM's behavior of adding a trailing slash to URL's This could save a lot of headaches wondering why Puppet is not behaving in an idempotent fashion. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 386b2550..04c22169 100644 --- a/README.md +++ b/README.md @@ -294,12 +294,16 @@ nodejs::npm { 'remove all express packages': nodejs::npm::global_config_entry can be used to set/remove global npm configuration settings. +Note that when specifying a URL, such as registry, NPM will add a trailing +slash when it stores the config. You must specify a trailing slash in your URL +or the code will not be idempotent. + Examples: ```puppet nodejs::npm::global_config_entry { 'proxy': ensure => 'present', - value => 'http://proxy.company.com:8080', + value => 'http://proxy.company.com:8080/', } ```