Skip to content

Commit efa03d4

Browse files
committed
Clean up version dir on install failure, fixes #4
1 parent 078f92a commit efa03d4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libexec/nodenv-install

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ curl -s -f "$download" > /tmp/node-$version.tar.gz && \
4141
tar zxf /tmp/node-$version.tar.gz --strip-components 1 || \
4242
{
4343
cd $OLDPWD
44+
rmdir "$version_dir"
45+
4446
echo "nodenv: unable to install NodeJS \`${version}' from binary, download not available"
4547
exit 1
4648
}

0 commit comments

Comments
 (0)