npm config set prefix $HOME sets prefix to '~' (tilde)

Bug #1045837 reported by Brian St. Pierre
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
npm (Ubuntu)
New
Undecided
Unassigned

Bug Description

Running on precise, npm-1.1.4~dfsg-1.

When I run `npm config set prefix $HOME`, it generates a $HOME/.npmrc with contents `prefix = ~`. (Note that $HOME is /home/me, not a literal tilde character.) When I run `npm install xxx`, it installs into /home/me/~/. I.e. it uses the tilde character as the literal prefix path.

I'm expecting that `npm config set prefix $HOME` will make files from subsequent installs land in $HOME/bin and $HOME/lib, and not in $HOME/~/bin and $HOME/~/lib.

When I manually edit $HOME/.npmrc so that "prefix = /home/me" then subsequent installations work as expected.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: npm 1.1.4~dfsg-1
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic 3.2.24
Uname: Linux 3.2.0-29-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu12
Architecture: amd64
Date: Tue Sep 4 10:05:24 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
PackageArchitecture: all
SourcePackage: npm
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Brian St. Pierre (bstpierre) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.