{"action":"opened","number":10092,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/10092","id":27999486,"html_url":"https://github.com/ansible/ansible/pull/10092","diff_url":"https://github.com/ansible/ansible/pull/10092.diff","patch_url":"https://github.com/ansible/ansible/pull/10092.patch","issue_url":"https://api.github.com/repos/ansible/ansible/issues/10092","number":10092,"state":"open","locked":false,"title":"In env-setup use basename -- $0 in case $0 starts with a dash.","user":{"login":"rpe-github","id":8281193,"avatar_url":"https://avatars.githubusercontent.com/u/8281193?v=3","gravatar_id":"","url":"https://api.github.com/users/rpe-github","html_url":"https://github.com/rpe-github","followers_url":"https://api.github.com/users/rpe-github/followers","following_url":"https://api.github.com/users/rpe-github/following{/other_user}","gists_url":"https://api.github.com/users/rpe-github/gists{/gist_id}","starred_url":"https://api.github.com/users/rpe-github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpe-github/subscriptions","organizations_url":"https://api.github.com/users/rpe-github/orgs","repos_url":"https://api.github.com/users/rpe-github/repos","events_url":"https://api.github.com/users/rpe-github/events{/privacy}","received_events_url":"https://api.github.com/users/rpe-github/received_events","type":"User","site_admin":false},"body":"##### Issue Type:\r\n\r\nBugfix Pull Request\r\n\r\n##### Ansible Version:\r\n\r\n```\r\nansible 1.9 (detached HEAD 0a73067153) last updated 2015/01/25 23:21:04 (GMT +200)\r\n  lib/ansible/modules/core: (detached HEAD 670098af2d) last updated 2015/01/25 23:21:57 (GMT +200)\r\n  lib/ansible/modules/extras: (detached HEAD 21126a4af3) last updated 2015/01/25 23:21:58 (GMT +200)\r\n  v2/ansible/modules/core: (detached HEAD 670098af2d) last updated 2015/01/25 23:21:58 (GMT +200)\r\n  v2/ansible/modules/extras: (detached HEAD 21126a4af3) last updated 2015/01/25 23:21:58 (GMT +200)\r\n  configured module search path = None\r\n```\r\n\r\n##### Environment:\r\n\r\n`OpenBSD 5.7-beta (GENERIC.MP) #0: Fri Jan 23 08:52:52 CET 2015`\r\n\r\n##### Summary:\r\n\r\nhacking/env-setup executes the basename command without protecting it against string values of $0 starting with a dash. For example in pdksh, which is the standard shell on OpenBSD has '-ksh' in $0.\r\n\r\n##### Steps To Reproduce:\r\n\r\n* use current git checkout of ansible source code\r\n* execute `. hacking/env-setup` inside `ansible` directory\r\n\r\n##### Expected Results:\r\n\r\n```\r\n[robert@x201|0]$ echo $0\r\n-ksh\r\n\r\n[robert@x201|0]$ . hacking/env-setup\r\nrunning egg_info\r\ncreating ansible.egg-info\r\nwriting requirements to ansible.egg-info/requires.txt\r\nwriting ansible.egg-info/PKG-INFO\r\nwriting top-level names to ansible.egg-info/top_level.txt\r\nwriting dependency_links to ansible.egg-info/dependency_links.txt\r\nwriting manifest file 'ansible.egg-info/SOURCES.txt'\r\nreading manifest file 'ansible.egg-info/SOURCES.txt'\r\nreading manifest template 'MANIFEST.in'\r\nno previously-included directories found matching 'lib/ansible/modules/core/.git'\r\nno previously-included directories found matching 'lib/ansible/modules/extras/.git'\r\nwriting manifest file 'ansible.egg-info/SOURCES.txt'\r\n\r\nSetting up Ansible to run out of checkout...\r\n\r\nPATH=/build/data/git/ansible/bin:/home/robert/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:/data/ports/infrastructure/bin:/build/data/ports/infrastructure/bin:.\r\nPYTHONPATH=/build/data/git/ansible/lib:\r\nMANPATH=/build/data/git/ansible/docs/man:\r\n\r\nRemember, you may wish to specify your host file with -i\r\n\r\nDone!\r\n```\r\n\r\n##### Actual Results:\r\n\r\n```\r\n[robert@x201|0]$ echo $0\r\n-ksh\r\n\r\n[robert@x201|0]$ . hacking/env-setup\r\nbasename: unknown option -- k\r\nusage: basename string [suffix]\r\nksh: hacking/env-setup[21]: [: env-setup: unexpected operator/operand\r\nrunning egg_info\r\ncreating ansible.egg-info\r\nwriting requirements to ansible.egg-info/requires.txt\r\nwriting ansible.egg-info/PKG-INFO\r\nwriting top-level names to ansible.egg-info/top_level.txt\r\nwriting dependency_links to ansible.egg-info/dependency_links.txt\r\nwriting manifest file 'ansible.egg-info/SOURCES.txt'\r\nreading manifest file 'ansible.egg-info/SOURCES.txt'\r\nreading manifest template 'MANIFEST.in'\r\nno previously-included directories found matching 'lib/ansible/modules/core/.git'\r\nno previously-included directories found matching 'lib/ansible/modules/extras/.git'\r\nwriting manifest file 'ansible.egg-info/SOURCES.txt'\r\n\r\nSetting up Ansible to run out of checkout...\r\n\r\nPATH=/build/data/git/ansible/bin:/home/robert/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:/data/ports/infrastructure/bin:/build/data/ports/infrastructure/bin:.\r\nPYTHONPATH=/build/data/git/ansible/lib:\r\nMANPATH=/build/data/git/ansible/docs/man:\r\n\r\nRemember, you may wish to specify your host file with -i\r\n\r\nDone!\r\n```","created_at":"2015-01-25T22:40:10Z","updated_at":"2015-01-25T22:40:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible/pulls/10092/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible/pulls/10092/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/10092/comments","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/0a730671539b7f3ba20ae4f5b156a893606eb78b","head":{"label":"rpe-github:devel","ref":"devel","sha":"0a730671539b7f3ba20ae4f5b156a893606eb78b","user":{"login":"rpe-github","id":8281193,"avatar_url":"https://avatars.githubusercontent.com/u/8281193?v=3","gravatar_id":"","url":"https://api.github.com/users/rpe-github","html_url":"https://github.com/rpe-github","followers_url":"https://api.github.com/users/rpe-github/followers","following_url":"https://api.github.com/users/rpe-github/following{/other_user}","gists_url":"https://api.github.com/users/rpe-github/gists{/gist_id}","starred_url":"https://api.github.com/users/rpe-github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpe-github/subscriptions","organizations_url":"https://api.github.com/users/rpe-github/orgs","repos_url":"https://api.github.com/users/rpe-github/repos","events_url":"https://api.github.com/users/rpe-github/events{/privacy}","received_events_url":"https://api.github.com/users/rpe-github/received_events","type":"User","site_admin":false},"repo":{"id":29693508,"name":"ansible","full_name":"rpe-github/ansible","owner":{"login":"rpe-github","id":8281193,"avatar_url":"https://avatars.githubusercontent.com/u/8281193?v=3","gravatar_id":"","url":"https://api.github.com/users/rpe-github","html_url":"https://github.com/rpe-github","followers_url":"https://api.github.com/users/rpe-github/followers","following_url":"https://api.github.com/users/rpe-github/following{/other_user}","gists_url":"https://api.github.com/users/rpe-github/gists{/gist_id}","starred_url":"https://api.github.com/users/rpe-github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpe-github/subscriptions","organizations_url":"https://api.github.com/users/rpe-github/orgs","repos_url":"https://api.github.com/users/rpe-github/repos","events_url":"https://api.github.com/users/rpe-github/events{/privacy}","received_events_url":"https://api.github.com/users/rpe-github/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rpe-github/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.","fork":true,"url":"https://api.github.com/repos/rpe-github/ansible","forks_url":"https://api.github.com/repos/rpe-github/ansible/forks","keys_url":"https://api.github.com/repos/rpe-github/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rpe-github/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rpe-github/ansible/teams","hooks_url":"https://api.github.com/repos/rpe-github/ansible/hooks","issue_events_url":"https://api.github.com/repos/rpe-github/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/rpe-github/ansible/events","assignees_url":"https://api.github.com/repos/rpe-github/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/rpe-github/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/rpe-github/ansible/tags","blobs_url":"https://api.github.com/repos/rpe-github/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rpe-github/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rpe-github/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/rpe-github/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rpe-github/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/rpe-github/ansible/languages","stargazers_url":"https://api.github.com/repos/rpe-github/ansible/stargazers","contributors_url":"https://api.github.com/repos/rpe-github/ansible/contributors","subscribers_url":"https://api.github.com/repos/rpe-github/ansible/subscribers","subscription_url":"https://api.github.com/repos/rpe-github/ansible/subscription","commits_url":"https://api.github.com/repos/rpe-github/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/rpe-github/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/rpe-github/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/rpe-github/ansible/issues/comments/{number}","contents_url":"https://api.github.com/repos/rpe-github/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/rpe-github/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rpe-github/ansible/merges","archive_url":"https://api.github.com/repos/rpe-github/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rpe-github/ansible/downloads","issues_url":"https://api.github.com/repos/rpe-github/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/rpe-github/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/rpe-github/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/rpe-github/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rpe-github/ansible/labels{/name}","releases_url":"https://api.github.com/repos/rpe-github/ansible/releases{/id}","created_at":"2015-01-22T18:34:07Z","updated_at":"2015-01-25T22:18:11Z","pushed_at":"2015-01-25T22:18:10Z","git_url":"git://github.com/rpe-github/ansible.git","ssh_url":"git@github.com:rpe-github/ansible.git","clone_url":"https://github.com/rpe-github/ansible.git","svn_url":"https://github.com/rpe-github/ansible","homepage":"http://ansible.com/","size":23317,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"ansible:devel","ref":"devel","sha":"53a3644ecd49dc7e9ee1a5ba5131a9298055dd33","user":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"repo":{"id":3638964,"name":"ansible","full_name":"ansible/ansible","owner":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ansible/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.","fork":false,"url":"https://api.github.com/repos/ansible/ansible","forks_url":"https://api.github.com/repos/ansible/ansible/forks","keys_url":"https://api.github.com/repos/ansible/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible/teams","hooks_url":"https://api.github.com/repos/ansible/ansible/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible/events","assignees_url":"https://api.github.com/repos/ansible/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible/tags","blobs_url":"https://api.github.com/repos/ansible/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible/subscription","commits_url":"https://api.github.com/repos/ansible/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible/issues/comments/{number}","contents_url":"https://api.github.com/repos/ansible/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible/merges","archive_url":"https://api.github.com/repos/ansible/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible/downloads","issues_url":"https://api.github.com/repos/ansible/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible/releases{/id}","created_at":"2012-03-06T14:58:02Z","updated_at":"2015-01-25T17:20:26Z","pushed_at":"2015-01-23T07:18:30Z","git_url":"git://github.com/ansible/ansible.git","ssh_url":"git@github.com:ansible/ansible.git","clone_url":"https://github.com/ansible/ansible.git","svn_url":"https://github.com/ansible/ansible","homepage":"http://ansible.com/","size":159020,"stargazers_count":9253,"watchers_count":9253,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2835,"mirror_url":null,"open_issues_count":656,"forks":2835,"open_issues":656,"watchers":9253,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/10092"},"html":{"href":"https://github.com/ansible/ansible/pull/10092"},"issue":{"href":"https://api.github.com/repos/ansible/ansible/issues/10092"},"comments":{"href":"https://api.github.com/repos/ansible/ansible/issues/10092/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible/pulls/10092/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible/pulls/10092/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible/statuses/0a730671539b7f3ba20ae4f5b156a893606eb78b"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}