checkly-cli icon indicating copy to clipboard operation
checkly-cli copied to clipboard

bug: referencing a file above the cwd / checkly config location fails

Open jan-osch opened this issue 2 years ago • 1 comments

Node.js version

16.19.1

NPM version

8.19.3

@checkly/cli version

4.0.12

Steps to reproduce

Repro repo: https://github.com/checkly/cli-playground-jan/tree/issue-file-outside-temp-dir

What is expected?

The check should pass

What is actually happening?

Check is failing because it cannot create a dependency file outside of the temp directory

Any additional comments?

No response

jan-osch avatar Jul 20 '23 07:07 jan-osch

@umutuzgur , as far I could investigate we should adjust dependencies path and make all to start from the path of the spec file. If now, the lambda-runner won't be able to handle ../../ path from the /tmp/... where the check runs. If we adjust the dependency path we have to modify the import path (in the spec file) adjusting it using a relative path starting from the spec file folder. I can create a draft PR to illustrate what I mean, but I would like to know if we agree in support it.

nahuelon avatar Aug 11 '23 02:08 nahuelon