GabrielBB / xvfb-action

Run your tests headlessly ❌🖥️
https://github.com/marketplace/actions/gabrielbb-xvfb-action
MIT License
140 stars 20 forks source link

working-directory passed as argument instead of used as working directory #8

Closed uozuAho closed 4 years ago

uozuAho commented 4 years ago

With the step:

- name: e2e tests
  uses: GabrielBB/xvfb-action@v1.2
  with:
    working-directory: subdir
    run: npm run e2e

The executed command in the log is /usr/bin/xvfb-run --auto-servernum npm run e2e subdir

I think the problem may be https://github.com/GabrielBB/xvfb-action/blob/e9adbdcd44108e54f12d6a49a373a074385b8512/index.js#L41 : I think it needs to be exec.exec(command, [], {cwd: directory}). See https://www.npmjs.com/package/@actions/exec