abort gracefully if no installed version #137

Merged
merged 1 commit into from Jul 9, 2013

2 participants

@jeromedecoster

When you use n for the first time or if you have removed all the versions under /usr/local/n/versions it shows a strange empty message:


    * 

This fix just check if there is at least one directory inside $VERSIONS_DIR
If no, abort gracefully with the error:

$ n

  Error: no installed version
@tj tj merged commit 3ea0210 into tj:master Jul 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment