{"action":"created","issue":{"url":"https://api.github.com/repos/creationix/nvm/issues/987","labels_url":"https://api.github.com/repos/creationix/nvm/issues/987/labels{/name}","comments_url":"https://api.github.com/repos/creationix/nvm/issues/987/comments","events_url":"https://api.github.com/repos/creationix/nvm/issues/987/events","html_url":"https://github.com/creationix/nvm/issues/987","id":129656479,"number":987,"title":"nvm.sh:114: parse error near `done'","user":{"login":"stevehanson","id":1691324,"avatar_url":"https://avatars.githubusercontent.com/u/1691324?v=3","gravatar_id":"","url":"https://api.github.com/users/stevehanson","html_url":"https://github.com/stevehanson","followers_url":"https://api.github.com/users/stevehanson/followers","following_url":"https://api.github.com/users/stevehanson/following{/other_user}","gists_url":"https://api.github.com/users/stevehanson/gists{/gist_id}","starred_url":"https://api.github.com/users/stevehanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevehanson/subscriptions","organizations_url":"https://api.github.com/users/stevehanson/orgs","repos_url":"https://api.github.com/users/stevehanson/repos","events_url":"https://api.github.com/users/stevehanson/events{/privacy}","received_events_url":"https://api.github.com/users/stevehanson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/creationix/nvm/labels/needs%20followup","name":"needs followup","color":"FA94FD"},{"url":"https://api.github.com/repos/creationix/nvm/labels/shell:%20zsh:%20oh-my-zsh","name":"shell: zsh: oh-my-zsh","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-01-29T03:34:02Z","updated_at":"2016-01-29T19:00:08Z","closed_at":null,"body":"Last week, I randomly started getting the following message when I open a new terminal window:\r\n\r\n```\r\n~/.nvm/nvm.sh:114: parse error near `done'\r\n```\r\n\r\nI tried uninstalling and reinstalling nvm with the following commands:\r\n\r\n```\r\n$ rm -rf ~/.nvm\r\n# remove the nvm load script from my zshell config\r\n$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash\r\n```\r\n\r\nbut I'm still getting the message. Here are the relevant lines (110-114) from `nvm.sh`:\r\n\r\n```\r\nlocal pathdir\r\npathdir=$(dirname \"$node_path\")\r\nwhile [ \"$pathdir\" != \"\" ] && [ \"$pathdir\" != \".\" ] && [ \"$pathdir\" != \"/\" ] && [ \"$pathdir\" != \"$tree\" ]; do\r\n  pathdir=$(dirname \"$pathdir\")\r\ndone\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/creationix/nvm/issues/comments/176913640","html_url":"https://github.com/creationix/nvm/issues/987#issuecomment-176913640","issue_url":"https://api.github.com/repos/creationix/nvm/issues/987","id":176913640,"user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T19:00:08Z","updated_at":"2016-01-29T19:00:08Z","body":"Awesome, thanks! whatever it turns out to be, if it's possible to make `nvm` work around it, I'll try to do so."}}