{"action":"created","issue":{"url":"https://api.github.com/repos/creationix/nvm/issues/1216","repository_url":"https://api.github.com/repos/creationix/nvm","labels_url":"https://api.github.com/repos/creationix/nvm/issues/1216/labels{/name}","comments_url":"https://api.github.com/repos/creationix/nvm/issues/1216/comments","events_url":"https://api.github.com/repos/creationix/nvm/issues/1216/events","html_url":"https://github.com/creationix/nvm/issues/1216","id":173436857,"number":1216,"title":"`nvm install 5` fails unless `nvm ls` before","user":{"login":"hedefalk","id":116520,"avatar_url":"https://avatars.githubusercontent.com/u/116520?v=3","gravatar_id":"","url":"https://api.github.com/users/hedefalk","html_url":"https://github.com/hedefalk","followers_url":"https://api.github.com/users/hedefalk/followers","following_url":"https://api.github.com/users/hedefalk/following{/other_user}","gists_url":"https://api.github.com/users/hedefalk/gists{/gist_id}","starred_url":"https://api.github.com/users/hedefalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hedefalk/subscriptions","organizations_url":"https://api.github.com/users/hedefalk/orgs","repos_url":"https://api.github.com/users/hedefalk/repos","events_url":"https://api.github.com/users/hedefalk/events{/privacy}","received_events_url":"https://api.github.com/users/hedefalk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/creationix/nvm/labels/installing%20node","name":"installing node","color":"fef2c0"},{"url":"https://api.github.com/repos/creationix/nvm/labels/needs%20followup","name":"needs followup","color":"FA94FD"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-26T11:57:46Z","updated_at":"2016-08-29T08:50:10Z","closed_at":null,"body":"`nvm install 5` fails unless I previously did a `nvm ls`. So `nvm ls` is obviously not idempotent which is a bit weird?\r\n\r\n```\r\n$ . \"$NVM_DIR/nvm.sh\"\r\n$ nvm install 5.0 || true\r\n$ nvm use 5.0 || true\r\nVersion '5.0' not found - try `nvm ls-remote` to browse available versions.\r\nN/A: version \"N/A\" is not yet installed.\r\n\r\nYou need to run \"nvm install N/A\" to install it before using it.\r\n$ cd $DRONE_DIR\r\n$ rm -rf node_modules\r\n/bin/sh: 46: npm: not found\r\n```\r\n\r\n\r\nIf I just add a `nvm ls` before it works:\r\n\r\n```\r\n$ git checkout `git describe --abbrev=0 --tags --match \"v[0-9]*\" origin`\r\nNote: checking out 'v0.31.6'.\r\n\r\nYou are in 'detached HEAD' state. You can look around, make experimental\r\nchanges and commit them, and you can discard any commits you make in this\r\nstate without impacting any branches by performing another checkout.\r\n\r\nIf you want to create a new branch to retain commits you create, you may\r\ndo so (now or later) by using -b with the checkout command again. Example:\r\n\r\n  git checkout -b new_branch_name\r\n\r\nHEAD is now at 31c68ad... v0.31.6\r\n$ . \"$NVM_DIR/nvm.sh\"\r\n$ nvm ls || true\r\n            N/A\r\nnode -> stable (-> N/A) (default)\r\n$ nvm install 5.0 || true\r\nDownloading https://nodejs.org/dist/v5.0.0/node-v5.0.0-linux-x64.tar.xz...\r\n######################################################################## 100.0%\r\nNow using node v5.0.0 (npm v3.3.6)\r\nCreating default alias: default -> 5.0 (-> v5.0.0 *)\r\n$ nvm use 5.0 || true\r\nNow using node v5.0.0 (npm v3.3.6)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/creationix/nvm/issues/comments/243068441","html_url":"https://github.com/creationix/nvm/issues/1216#issuecomment-243068441","issue_url":"https://api.github.com/repos/creationix/nvm/issues/1216","id":243068441,"user":{"login":"hedefalk","id":116520,"avatar_url":"https://avatars.githubusercontent.com/u/116520?v=3","gravatar_id":"","url":"https://api.github.com/users/hedefalk","html_url":"https://github.com/hedefalk","followers_url":"https://api.github.com/users/hedefalk/followers","following_url":"https://api.github.com/users/hedefalk/following{/other_user}","gists_url":"https://api.github.com/users/hedefalk/gists{/gist_id}","starred_url":"https://api.github.com/users/hedefalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hedefalk/subscriptions","organizations_url":"https://api.github.com/users/hedefalk/orgs","repos_url":"https://api.github.com/users/hedefalk/repos","events_url":"https://api.github.com/users/hedefalk/events{/privacy}","received_events_url":"https://api.github.com/users/hedefalk/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T08:50:10Z","updated_at":"2016-08-29T08:50:10Z","body":"https://gist.github.com/hedefalk/e1e6d1ddc60ae97ac5ea3bffe3f34afb\r\n\r\nSorry, `|| true` because https://github.com/creationix/nvm/issues/993 - basically my build fails on on everything without because `set -e` from surrounding environment."}}
{"actor":{"display_login":"hedefalk"}}