{"action":"created","issue":{"url":"https://api.github.com/repos/projectatomic/atomicapp/issues/311","labels_url":"https://api.github.com/repos/projectatomic/atomicapp/issues/311/labels{/name}","comments_url":"https://api.github.com/repos/projectatomic/atomicapp/issues/311/comments","events_url":"https://api.github.com/repos/projectatomic/atomicapp/issues/311/events","html_url":"https://github.com/projectatomic/atomicapp/issues/311","id":110994052,"number":311,"title":"atomicapp unable to check symblink location /host/bin/oc","user":{"login":"sub-mod","id":7363264,"avatar_url":"https://avatars.githubusercontent.com/u/7363264?v=3","gravatar_id":"","url":"https://api.github.com/users/sub-mod","html_url":"https://github.com/sub-mod","followers_url":"https://api.github.com/users/sub-mod/followers","following_url":"https://api.github.com/users/sub-mod/following{/other_user}","gists_url":"https://api.github.com/users/sub-mod/gists{/gist_id}","starred_url":"https://api.github.com/users/sub-mod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sub-mod/subscriptions","organizations_url":"https://api.github.com/users/sub-mod/orgs","repos_url":"https://api.github.com/users/sub-mod/repos","events_url":"https://api.github.com/users/sub-mod/events{/privacy}","received_events_url":"https://api.github.com/users/sub-mod/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-12T15:08:53Z","updated_at":"2015-10-13T09:25:00Z","closed_at":null,"body":"when running atomic run APP command below code doesnot check if oc is symbolic link\r\nhttps://github.com/projectatomic/atomicapp/blob/master/atomicapp/providers/openshift.py#L47\r\nIt only checks if it is file\r\nNeed to implement a custom method\r\n```\r\ndef find_executable(executable, path=None):\r\n    \"\"\"Tries to find 'executable' in the directories listed in 'path'.\r\n\r\n    A string listing directories separated by 'os.pathsep'; defaults to\r\n    os.environ['PATH'].  Returns the complete filename or None if not found.\r\n    \"\"\"\r\n    if path is None:\r\n        path = os.environ['PATH']\r\n\r\n    paths = path.split(os.pathsep)\r\n    base, ext = os.path.splitext(executable)\r\n\r\n    if (sys.platform == 'win32' or os.name == 'os2') and (ext != '.exe'):\r\n        executable = executable + '.exe'\r\n\r\n    if not os.path.isfile(executable):\r\n        for p in paths:\r\n            f = os.path.join(p, executable)\r\n            if os.path.isfile(f) or os.path.islink(\"/host/bin/oc\")\r\n                # the file exists, we have a shot at spawn working\r\n                return f\r\n        return None\r\n    else:\r\n        return executable\r\n```"},"comment":{"url":"https://api.github.com/repos/projectatomic/atomicapp/issues/comments/147660327","html_url":"https://github.com/projectatomic/atomicapp/issues/311#issuecomment-147660327","issue_url":"https://api.github.com/repos/projectatomic/atomicapp/issues/311","id":147660327,"user":{"login":"sub-mod","id":7363264,"avatar_url":"https://avatars.githubusercontent.com/u/7363264?v=3","gravatar_id":"","url":"https://api.github.com/users/sub-mod","html_url":"https://github.com/sub-mod","followers_url":"https://api.github.com/users/sub-mod/followers","following_url":"https://api.github.com/users/sub-mod/following{/other_user}","gists_url":"https://api.github.com/users/sub-mod/gists{/gist_id}","starred_url":"https://api.github.com/users/sub-mod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sub-mod/subscriptions","organizations_url":"https://api.github.com/users/sub-mod/orgs","repos_url":"https://api.github.com/users/sub-mod/repos","events_url":"https://api.github.com/users/sub-mod/events{/privacy}","received_events_url":"https://api.github.com/users/sub-mod/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T09:25:00Z","updated_at":"2015-10-13T09:25:00Z","body":"needed for https://github.com/cockpit-project/cockpit/pull/2921"}}