Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENOENT: no such file or directory when host contains protocol #5

Open
WtfJoke opened this issue Aug 14, 2023 · 0 comments
Open

ENOENT: no such file or directory when host contains protocol #5

WtfJoke opened this issue Aug 14, 2023 · 0 comments

Comments

@WtfJoke
Copy link

WtfJoke commented Aug 14, 2023

ENOENT: no such file or directory, open '/home/runner/work/project/project/output/undefined'

If you pass a domain with protocol e.g https://example.com (instead of example.com) the report file cannot be found.

Example (non working):

- uses: mbogh/test-ssl-action@v2
  with:
    host: https://example.com

Example (working):

- uses: mbogh/test-ssl-action@v2
  with:
    host: example.com

The cause is, that the report is generated without the protocol eg. example.com...json

The issue is most likely on this line (a potential fix, either validate host or change startsWith to contains):

let reportFile = fs.readdirSync(path).filter(fn => fn.startsWith(host) && fn.endsWith('.json'))[0];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant