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

Bug: polywrap.test.yaml validation script URI is resolved relative to user cwd instead of manifest directory #1228

Closed
krisbitney opened this issue Sep 9, 2022 · 2 comments
Assignees
Labels
type: bug Something isn't working

Comments

@krisbitney
Copy link
Contributor

krisbitney commented Sep 9, 2022

Describe the bug
It is possible to provide a path to a validation script in the polywrap.test.yaml manifest. But the path is resolved relative to the current working directory of the user. This is unexpected behavior.

Expected behavior
Let's say I put the manifest and validator files together in a subfolder called workflows. The files are then located at workflows/polywrap.test.yaml and workflows/validator.cue.

Then I add the following line to the manifest:

validation: "./validator.cue"

Next I add a script to my package.json:

"workflow":  "npx polywrap run -m ./workflows/polywrap.test.yaml"

I expect to be able to run the script from the root of my project. I will instead get an error saying the validator file cannot be found. The run command will look for the validator script in the project root instead of in the workflows folder.

@krisbitney krisbitney added the type: bug Something isn't working label Sep 9, 2022
@fetsorn fetsorn self-assigned this Sep 9, 2022
@fetsorn
Copy link
Contributor

fetsorn commented Sep 9, 2022

@krisbitney Thank you for catching this!

@krisbitney
Copy link
Contributor Author

fixed by #1229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants