{"action":"created","issue":{"url":"https://api.github.com/repos/mlafeldt/sharness/issues/21","labels_url":"https://api.github.com/repos/mlafeldt/sharness/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/mlafeldt/sharness/issues/21/comments","events_url":"https://api.github.com/repos/mlafeldt/sharness/issues/21/events","html_url":"https://github.com/mlafeldt/sharness/pull/21","id":85598475,"number":21,"title":"Use $SHELL instead of $SHELL_PATH in sharness.t","user":{"login":"chriscool","id":208954,"avatar_url":"https://avatars.githubusercontent.com/u/208954?v=3","gravatar_id":"","url":"https://api.github.com/users/chriscool","html_url":"https://github.com/chriscool","followers_url":"https://api.github.com/users/chriscool/followers","following_url":"https://api.github.com/users/chriscool/following{/other_user}","gists_url":"https://api.github.com/users/chriscool/gists{/gist_id}","starred_url":"https://api.github.com/users/chriscool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriscool/subscriptions","organizations_url":"https://api.github.com/users/chriscool/orgs","repos_url":"https://api.github.com/users/chriscool/repos","events_url":"https://api.github.com/users/chriscool/events{/privacy}","received_events_url":"https://api.github.com/users/chriscool/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-05T18:23:06Z","updated_at":"2015-06-07T13:45:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mlafeldt/sharness/pulls/21","html_url":"https://github.com/mlafeldt/sharness/pull/21","diff_url":"https://github.com/mlafeldt/sharness/pull/21.diff","patch_url":"https://github.com/mlafeldt/sharness/pull/21.patch"},"body":"In Git, test-lib.sh sources the GIT-BUILD-OPTIONS file\r\nwhere SHELL_PATH is defined, and then exports SHELL_PATH,\r\nso this environment variable is available to all the\r\ntest scripts.\r\n\r\nIn sharness there is no GIT-BUILD-OPTIONS so sharness.sh\r\ndoesn't have SHELL_PATH defined, and doesn't export it.\r\nThat's why it is not defined in sharness.t too, and it is\r\nwrong to use it.\r\n\r\nNow sharness.t still works because the following works:\r\n\r\n$ cat >test.sh <<EOF\r\n> #!\r\n> echo \"it works!\"\r\n> EOF\r\n$ chmod +x test.sh\r\n$ ./test.sh\r\nit works!\r\n\r\nbut it is better to use $SHELL instead of $SHELL_PATH\r\nanyway."},"comment":{"url":"https://api.github.com/repos/mlafeldt/sharness/issues/comments/109758254","html_url":"https://github.com/mlafeldt/sharness/pull/21#issuecomment-109758254","issue_url":"https://api.github.com/repos/mlafeldt/sharness/issues/21","id":109758254,"user":{"login":"chriscool","id":208954,"avatar_url":"https://avatars.githubusercontent.com/u/208954?v=3","gravatar_id":"","url":"https://api.github.com/users/chriscool","html_url":"https://github.com/chriscool","followers_url":"https://api.github.com/users/chriscool/followers","following_url":"https://api.github.com/users/chriscool/following{/other_user}","gists_url":"https://api.github.com/users/chriscool/gists{/gist_id}","starred_url":"https://api.github.com/users/chriscool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriscool/subscriptions","organizations_url":"https://api.github.com/users/chriscool/orgs","repos_url":"https://api.github.com/users/chriscool/repos","events_url":"https://api.github.com/users/chriscool/events{/privacy}","received_events_url":"https://api.github.com/users/chriscool/received_events","type":"User","site_admin":false},"created_at":"2015-06-07T13:45:48Z","updated_at":"2015-06-07T13:45:48Z","body":"@mlafeldt, @johnkeeping I am ok with adding something like the following in \"sharness.sh\":\r\n\r\n```\r\ntest -n \"$SHELL_PATH\" || SHELL_PATH=\"$SHELL\"\r\nexport SHELL_PATH\r\n```\r\n\r\nwhich is another way to fix the problem in \"sharness.t\" and which lets people customize subshells as it is done in the Makefile."}}