{"action":"created","issue":{"url":"https://api.github.com/repos/jorangreef/sudo/issues/2","labels_url":"https://api.github.com/repos/jorangreef/sudo/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/jorangreef/sudo/issues/2/comments","events_url":"https://api.github.com/repos/jorangreef/sudo/issues/2/events","html_url":"https://github.com/jorangreef/sudo/issues/2","id":99017979,"number":2,"title":"Doesn't pull up an OS X dialog box to prompt for password","user":{"login":"erikmellum","id":6475033,"avatar_url":"https://avatars.githubusercontent.com/u/6475033?v=3","gravatar_id":"","url":"https://api.github.com/users/erikmellum","html_url":"https://github.com/erikmellum","followers_url":"https://api.github.com/users/erikmellum/followers","following_url":"https://api.github.com/users/erikmellum/following{/other_user}","gists_url":"https://api.github.com/users/erikmellum/gists{/gist_id}","starred_url":"https://api.github.com/users/erikmellum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikmellum/subscriptions","organizations_url":"https://api.github.com/users/erikmellum/orgs","repos_url":"https://api.github.com/users/erikmellum/repos","events_url":"https://api.github.com/users/erikmellum/events{/privacy}","received_events_url":"https://api.github.com/users/erikmellum/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-04T17:23:04Z","updated_at":"2015-08-10T06:24:55Z","closed_at":"2015-08-10T03:39:40Z","body":"I can't seem to get this to pull up a dialog box even in the simplest of cases. If I try the following:\r\n\r\n```\r\nsudo.exec('touch /etc/test.txt', function(err){if(err)console.log(err)})\r\n```\r\nIt will silently fail with no prompt, and nothing on the errors object.\r\n\r\nI did notice one thing that may be relevant.\r\n\r\nIf I attempt the command in the console window `sudo touch /etc/test.txt` then I get a prompt to enter the password. After I have entered the password using the command window, the programmatic version begins to work with sudo commands (but will never properly prompt for a password). I would really like to figure out why this isn't working and was wondering if you had any debug suggestions. \r\n\r\nI've also tried mixing `sudo.touch` in various locations without success. \r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/jorangreef/sudo/issues/comments/129319942","html_url":"https://github.com/jorangreef/sudo/issues/2#issuecomment-129319942","issue_url":"https://api.github.com/repos/jorangreef/sudo/issues/2","id":129319942,"user":{"login":"jorangreef","id":413206,"avatar_url":"https://avatars.githubusercontent.com/u/413206?v=3","gravatar_id":"","url":"https://api.github.com/users/jorangreef","html_url":"https://github.com/jorangreef","followers_url":"https://api.github.com/users/jorangreef/followers","following_url":"https://api.github.com/users/jorangreef/following{/other_user}","gists_url":"https://api.github.com/users/jorangreef/gists{/gist_id}","starred_url":"https://api.github.com/users/jorangreef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorangreef/subscriptions","organizations_url":"https://api.github.com/users/jorangreef/orgs","repos_url":"https://api.github.com/users/jorangreef/repos","events_url":"https://api.github.com/users/jorangreef/events{/privacy}","received_events_url":"https://api.github.com/users/jorangreef/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T06:24:55Z","updated_at":"2015-08-10T06:24:55Z","body":"That's great to hear.\r\n\r\nsudo-prompt works without native dependencies by creating a copy of the osascript binary using the title of your process as the binary name. It does this so that the password prompt shows as being from your application.\r\n\r\nI think the reason your process.title didn't work is because it contained slashes which are not valid in a pathname. sudo-prompt should definitely have given you an error in the callback if your process title was invalid:\r\n\r\n```\r\n[Error: Please use sudo.setName(string) to set your app name (process.title contains invalid characters).]\r\n```"}}