{"action":"created","issue":{"url":"https://api.github.com/repos/creationix/nvm/issues/867","labels_url":"https://api.github.com/repos/creationix/nvm/issues/867/labels{/name}","comments_url":"https://api.github.com/repos/creationix/nvm/issues/867/comments","events_url":"https://api.github.com/repos/creationix/nvm/issues/867/events","html_url":"https://github.com/creationix/nvm/issues/867","id":110798055,"number":867,"title":"Problems with nvm installation, syntax error in ~/.nvm/nvm.sh","user":{"login":"allantatter","id":386999,"avatar_url":"https://avatars.githubusercontent.com/u/386999?v=3","gravatar_id":"","url":"https://api.github.com/users/allantatter","html_url":"https://github.com/allantatter","followers_url":"https://api.github.com/users/allantatter/followers","following_url":"https://api.github.com/users/allantatter/following{/other_user}","gists_url":"https://api.github.com/users/allantatter/gists{/gist_id}","starred_url":"https://api.github.com/users/allantatter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allantatter/subscriptions","organizations_url":"https://api.github.com/users/allantatter/orgs","repos_url":"https://api.github.com/users/allantatter/repos","events_url":"https://api.github.com/users/allantatter/events{/privacy}","received_events_url":"https://api.github.com/users/allantatter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/creationix/nvm/labels/installing","name":"installing","color":"fef2c0"},{"url":"https://api.github.com/repos/creationix/nvm/labels/needs%20followup","name":"needs followup","color":"FA94FD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-10T14:40:00Z","updated_at":"2015-10-10T21:33:24Z","closed_at":null,"body":"I only following the following installation instructions\r\n\r\n```\r\ncurl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash\r\n```\r\n\r\nand after restarting Terminal, I get this:\r\n\r\n```\r\n-bash: /Users/allantatter/.nvm/nvm.sh: line 110: syntax error near unexpected token `done'\r\n-bash: /Users/allantatter/.nvm/nvm.sh: line 110: `  done'\r\n```\r\n\r\nAny ideas? I have been stuck with the problem more than a hour, haven't found a solution online yet..\r\n\r\nThe part of ~/.nvm/nvm.sh file where the syntax error is thrown:\r\n\r\n```\r\nnvm_tree_contains_path() {\r\n  local tree\r\n  tree=\"$1\"\r\n  local node_path\r\n  node_path=\"$2\"\r\n\r\n  if [ \"@$tree@\" = \"@@\" ] || [ \"@$node_path@\" = \"@@\" ]; then\r\n    >&2 echo \"both the tree and the node path are required\"\r\n    return 2\r\n  fi\r\n\r\n  local pathdir\r\n  pathdir=$(dirname \"$node_path\")\r\n  while [ \"$pathdir\" != \"\" ] && [ \"$pathdir\" != \".\" ] && [ \"$pathdir\" != \"/\" ] && [ \"$pathdir\" != \"$tree\" ]; do\r\n    pathdir=$(dirname \"$pathdir\")\r\n  done\r\n  [ \"$pathdir\" = \"$tree\" ]\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/creationix/nvm/issues/comments/147127374","html_url":"https://github.com/creationix/nvm/issues/867#issuecomment-147127374","issue_url":"https://api.github.com/repos/creationix/nvm/issues/867","id":147127374,"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":"2015-10-10T21:33:24Z","updated_at":"2015-10-10T21:33:24Z","body":"Can you gist your `bashrc` or `bash_profile` contents? It's likely a syntax error in your actual profile files, that `nvm` is just exposing."}}