{"action":"created","issue":{"url":"https://api.github.com/repos/sorin-ionescu/prezto/issues/795","labels_url":"https://api.github.com/repos/sorin-ionescu/prezto/issues/795/labels{/name}","comments_url":"https://api.github.com/repos/sorin-ionescu/prezto/issues/795/comments","events_url":"https://api.github.com/repos/sorin-ionescu/prezto/issues/795/events","html_url":"https://github.com/sorin-ionescu/prezto/issues/795","id":56851106,"number":795,"title":"Unable to source ROS source files (creates temporary files in /tmp/)","user":{"login":"routeaccess","id":5763537,"avatar_url":"https://avatars.githubusercontent.com/u/5763537?v=3","gravatar_id":"","url":"https://api.github.com/users/routeaccess","html_url":"https://github.com/routeaccess","followers_url":"https://api.github.com/users/routeaccess/followers","following_url":"https://api.github.com/users/routeaccess/following{/other_user}","gists_url":"https://api.github.com/users/routeaccess/gists{/gist_id}","starred_url":"https://api.github.com/users/routeaccess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/routeaccess/subscriptions","organizations_url":"https://api.github.com/users/routeaccess/orgs","repos_url":"https://api.github.com/users/routeaccess/repos","events_url":"https://api.github.com/users/routeaccess/events{/privacy}","received_events_url":"https://api.github.com/users/routeaccess/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sorin-ionescu/prezto/labels/Discussion","name":"Discussion","color":"DC3345"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-06T18:48:49Z","updated_at":"2015-02-14T16:40:46Z","closed_at":"2015-02-12T15:07:33Z","body":"When I'm trying to use the [ROS](http://www.ros.org/) framework for robotics, I'm not able to source the overlay files. The command `source /opt/ros/indigo/setup.zsh` fails with the following error \r\n\r\n```bash\r\n/opt/ros/indigo/setup.sh:52: file exists: /tmp/setup.sh.CkuqltdAon\r\nFailed to run '\"/opt/ros/indigo/_setup_util.py\" ': return code 1\r\n```\r\n\r\nThe curious fact is, the command when added to `.zshenv` works fine, but throws the above error when it is run from the terminal or when added to `.zshrc` (The error output shows up at the beginning of a new terminal when added to `.zshrc`)\r\n\r\nThis is the code snippet which fails (lines 41-52 from `/opt/ros/indigo/setup.sh` which is called by `/opt/ros/indigo/setup.zsh`) :\r\n```bash\r\n# remember type of shell if not already set\r\nif [ -z \"$CATKIN_SHELL\" ]; then\r\n  CATKIN_SHELL=sh\r\nfi\r\n\r\n# invoke Python script to generate necessary exports of environment variables\r\n_SETUP_TMP=`mktemp /tmp/setup.sh.XXXXXXXXXX`\r\nif [ $? -ne 0 -o ! -f \"$_SETUP_TMP\" ]; then\r\n  echo \"Could not create temporary file: $_SETUP_TMP\"\r\n  return 1\r\nfi\r\nCATKIN_SHELL=$CATKIN_SHELL \"$_SETUP_UTIL\" $@ > $_SETUP_TMP\r\n```\r\nThis snippet fails at the last line.\r\n\r\nThe file mentioned in the error inside `/tmp/` is only a temporary file made with a random string name appended to it and the script being sourced runs fine when used in `.zshenv` which leads me to believe it is a bug. Ideally I should be able to run it inside the terminal as is possible when not using a framework."},"comment":{"url":"https://api.github.com/repos/sorin-ionescu/prezto/issues/comments/74381913","html_url":"https://github.com/sorin-ionescu/prezto/issues/795#issuecomment-74381913","issue_url":"https://api.github.com/repos/sorin-ionescu/prezto/issues/795","id":74381913,"user":{"login":"sorin-ionescu","id":93816,"avatar_url":"https://avatars.githubusercontent.com/u/93816?v=3","gravatar_id":"","url":"https://api.github.com/users/sorin-ionescu","html_url":"https://github.com/sorin-ionescu","followers_url":"https://api.github.com/users/sorin-ionescu/followers","following_url":"https://api.github.com/users/sorin-ionescu/following{/other_user}","gists_url":"https://api.github.com/users/sorin-ionescu/gists{/gist_id}","starred_url":"https://api.github.com/users/sorin-ionescu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorin-ionescu/subscriptions","organizations_url":"https://api.github.com/users/sorin-ionescu/orgs","repos_url":"https://api.github.com/users/sorin-ionescu/repos","events_url":"https://api.github.com/users/sorin-ionescu/events{/privacy}","received_events_url":"https://api.github.com/users/sorin-ionescu/received_events","type":"User","site_admin":false},"created_at":"2015-02-14T16:40:46Z","updated_at":"2015-02-14T16:40:46Z","body":"You shouldn't be sourcing it in zshenv but zprofile.\r\n\r\nSyntax errors are not a Prezto-induced problem since it would not work with or without ROS.\r\n\r\nWithout seeing those ROS files, I have no way of figuring out what the problem is."}}