{"action":"created","issue":{"url":"https://api.github.com/repos/spark/particle-cli/issues/82","labels_url":"https://api.github.com/repos/spark/particle-cli/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/spark/particle-cli/issues/82/comments","events_url":"https://api.github.com/repos/spark/particle-cli/issues/82/events","html_url":"https://github.com/spark/particle-cli/pull/82","id":98831493,"number":82,"title":"Prompt to install UDEV rules for dfu","user":{"login":"monkbroc","id":1919681,"avatar_url":"https://avatars.githubusercontent.com/u/1919681?v=3","gravatar_id":"","url":"https://api.github.com/users/monkbroc","html_url":"https://github.com/monkbroc","followers_url":"https://api.github.com/users/monkbroc/followers","following_url":"https://api.github.com/users/monkbroc/following{/other_user}","gists_url":"https://api.github.com/users/monkbroc/gists{/gist_id}","starred_url":"https://api.github.com/users/monkbroc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monkbroc/subscriptions","organizations_url":"https://api.github.com/users/monkbroc/orgs","repos_url":"https://api.github.com/users/monkbroc/repos","events_url":"https://api.github.com/users/monkbroc/events{/privacy}","received_events_url":"https://api.github.com/users/monkbroc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-03T20:21:35Z","updated_at":"2015-08-04T02:44:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/spark/particle-cli/pulls/82","html_url":"https://github.com/spark/particle-cli/pull/82","diff_url":"https://github.com/spark/particle-cli/pull/82.diff","patch_url":"https://github.com/spark/particle-cli/pull/82.patch"},"body":"On Linux only root can access USB devices through dfu. Right now doing `particle flash --usb` will say \"no dfu device found\" without suggesting how to fix the issue.\r\n\r\nIt's possible to use sudo to work around this, but a better solution is to install UDEV rules to allow any user to access a particular device.\r\n\r\nThis PR prompts the user to install UDEV rules when the dfu-util failure indicates missing permissions.\r\n\r\nThe UDEV rules was checked for the Photon on Ubuntu 15.10. I included rules for the Core, P1 and Electron, but I can't try those.\r\n\r\nSomebody working on the CLI should review the code and check if I put the code in the right place as I'm not familiar with the structure of the application.\r\n\r\nThis fixes #74."},"comment":{"url":"https://api.github.com/repos/spark/particle-cli/issues/comments/127460169","html_url":"https://github.com/spark/particle-cli/pull/82#issuecomment-127460169","issue_url":"https://api.github.com/repos/spark/particle-cli/issues/82","id":127460169,"user":{"login":"monkbroc","id":1919681,"avatar_url":"https://avatars.githubusercontent.com/u/1919681?v=3","gravatar_id":"","url":"https://api.github.com/users/monkbroc","html_url":"https://github.com/monkbroc","followers_url":"https://api.github.com/users/monkbroc/followers","following_url":"https://api.github.com/users/monkbroc/following{/other_user}","gists_url":"https://api.github.com/users/monkbroc/gists{/gist_id}","starred_url":"https://api.github.com/users/monkbroc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monkbroc/subscriptions","organizations_url":"https://api.github.com/users/monkbroc/orgs","repos_url":"https://api.github.com/users/monkbroc/repos","events_url":"https://api.github.com/users/monkbroc/events{/privacy}","received_events_url":"https://api.github.com/users/monkbroc/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T02:44:43Z","updated_at":"2015-08-04T02:44:43Z","body":"OS check is done by checking if the UDEV rules directory exists before prompting to install UDEV rules."}}