{"action":"created","issue":{"url":"https://api.github.com/repos/bryphe/esy-bash/issues/24","repository_url":"https://api.github.com/repos/bryphe/esy-bash","labels_url":"https://api.github.com/repos/bryphe/esy-bash/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/bryphe/esy-bash/issues/24/comments","events_url":"https://api.github.com/repos/bryphe/esy-bash/issues/24/events","html_url":"https://github.com/bryphe/esy-bash/issues/24","id":372216898,"node_id":"MDU6SXNzdWUzNzIyMTY4OTg=","number":24,"title":"Native EsyBash: 'ls' command doesn't work","user":{"login":"bryphe","id":13532591,"node_id":"MDQ6VXNlcjEzNTMyNTkx","avatar_url":"https://avatars1.githubusercontent.com/u/13532591?v=4","gravatar_id":"","url":"https://api.github.com/users/bryphe","html_url":"https://github.com/bryphe","followers_url":"https://api.github.com/users/bryphe/followers","following_url":"https://api.github.com/users/bryphe/following{/other_user}","gists_url":"https://api.github.com/users/bryphe/gists{/gist_id}","starred_url":"https://api.github.com/users/bryphe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryphe/subscriptions","organizations_url":"https://api.github.com/users/bryphe/orgs","repos_url":"https://api.github.com/users/bryphe/repos","events_url":"https://api.github.com/users/bryphe/events{/privacy}","received_events_url":"https://api.github.com/users/bryphe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-10-20T14:25:39Z","updated_at":"2018-10-22T15:51:19Z","closed_at":null,"author_association":"OWNER","body":"With the native version of `esy-bash`, the `ls` command doesn't work:\r\n```\r\nE:\\esy-bash\\re\\_build\\default\\bin [master ≡ +1 ~0 -0 !]> ./EsyBash.exe ls -a\r\nC:\\Users\\bryph\\AppData\\Local\\Temp\\__esy-bash__79677993__1__.sh: line 2: ls: command not found\r\n```\r\n\r\nHowever, this works correctly with the node version:\r\n```\r\nE:\\esy-bash [master ≡ +1 ~0 -0 !]> node .\\bin\\esy-bash.js ls -a\r\n.        .git         __tests__     bin              jest.config.js  package.json       re\r\n..       .gitignore   appveyor.yml  index.js         LICENSE         package-lock.json  README.md\r\n.cygwin  .travis.yml  bash-exec.js  install-opam.sh  node_modules    postinstall.js\r\n```\r\n\r\nIt looks like the difference is that the JS version is somehow including `/usr/local/bin` and /usr/bin` in the PATH, whereas the native version is not. I'm not sure if this is some difference in how we spin up the bash process? We'll need to make sure these are included in the PATH\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bryphe/esy-bash/issues/comments/431875841","html_url":"https://github.com/bryphe/esy-bash/issues/24#issuecomment-431875841","issue_url":"https://api.github.com/repos/bryphe/esy-bash/issues/24","id":431875841,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTg3NTg0MQ==","user":{"login":"bryphe","id":13532591,"node_id":"MDQ6VXNlcjEzNTMyNTkx","avatar_url":"https://avatars1.githubusercontent.com/u/13532591?v=4","gravatar_id":"","url":"https://api.github.com/users/bryphe","html_url":"https://github.com/bryphe","followers_url":"https://api.github.com/users/bryphe/followers","following_url":"https://api.github.com/users/bryphe/following{/other_user}","gists_url":"https://api.github.com/users/bryphe/gists{/gist_id}","starred_url":"https://api.github.com/users/bryphe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryphe/subscriptions","organizations_url":"https://api.github.com/users/bryphe/orgs","repos_url":"https://api.github.com/users/bryphe/repos","events_url":"https://api.github.com/users/bryphe/events{/privacy}","received_events_url":"https://api.github.com/users/bryphe/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T15:51:19Z","updated_at":"2018-10-22T15:51:19Z","author_association":"OWNER","body":"Thanks for the fix @prometheansacrifice !\r\n\r\n> Writing tests for this will be a little tricky since the cygwin binaries are already on the path when run in the test environment.\r\n\r\nThis is because we'd run the tests via `esy b dune runtest`? So the paths already get included by `esy`?\r\n\r\nOne alternative would be to continue using node/javascript for our tests - we could run those outside of the esy sandbox. We'd just have to change the way that we invoke esy-bash - using our executable instead of the JS script.\r\n\r\n"}}
{"actor":{"display_login":"bryphe"}}