Use symlinks instead of copying files upon switch #85

Merged
merged 1 commit into from Sep 30, 2012

Projects

None yet

3 participants

@Suor
Suor commented Sep 30, 2012

Backward incompatible change - any modules and executables
such as npm, coffee and even n itself are now different
for different node versions.

This is probably a good thing anyway. At least you won't get something like
"npm won't work with your node 0.8.11, install 0.6, please"

@Suor Suor Use symlinks instead of copying files upon switch.
Bakward incompatable change - any modules and executables
such as npm, coffee and even n itself are now diffrent
for diffrent node versions. This is probably a good thing anyway.
0895ea3
@tj tj merged commit 77946bb into tj:master Sep 30, 2012
@benatkin benatkin commented on the diff Oct 7, 2012
@@ -138,12 +138,11 @@ install_node() {
# activate
local dir=$VERSIONS_DIR/$version
if test -d $dir; then
- # TODO: refactor, this is lame
- cd $dir \
- && mkdir -p $N_PREFIX/lib/node \
- && cp -fR $dir/include/node $N_PREFIX/include \
- && cp -fR $dir/bin/* $N_PREFIX/bin \
- && cp -fR $dir/lib/node/* $N_PREFIX/lib/node/ .
+ # symlink everything, purge old copies or symlinks
+ for d in bin lib share include; do
+ rm -rf $N_PREFIX/$d
@benatkin
Collaborator
benatkin commented Oct 8, 2012

I think the README should be changed to link to the npm tarball, instead of suggesting installing it from git. This bad commit isn't in npm.

@tj
Owner
tj commented Oct 8, 2012

this project is kinda in limbo i wont lie haha, i dont have time to properly review things :( a maintainer would be fantastic

@benatkin
Collaborator
benatkin commented Oct 8, 2012

In the mean time please just do git revert HEAD and git push

@benatkin
Collaborator
benatkin commented Oct 8, 2012

Or instead use this commit ID...head might be a merge commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment