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

Update core.sh #6

Merged
merged 1 commit into from
Mar 11, 2021
Merged

Update core.sh #6

merged 1 commit into from
Mar 11, 2021

Conversation

CohenCyril
Copy link
Contributor

@CohenCyril CohenCyril commented Mar 11, 2021

echo "File at `nix_file` does not exist"

Using ` ` causes shell evaluation of nix_file and leads to a weird error...

This error hides a more problematic one: where does the shell variable INPUT_NIX_FILE come from?

https://github.com/rikhuijzer/cache-install/blob/138361d26eeecf28d796a4e778761fb0f9b71625/src/core.sh#L57

Using `` ` ` `` causes shell evaluation of `nix_file` and leads to a weird error...
@rikhuijzer rikhuijzer merged commit 46a570a into rikhuijzer:master Mar 11, 2021
@rikhuijzer
Copy link
Owner

The INPUT_NIX_FILE comes from a GitHub Action specific convention. The variables available to the action are set in action.yml. There, you can see that nix_file should be defined by the user. Then, GitHub Actions converts nix_file into the environment variable INPUT_NIX_FILE.

@CohenCyril
Copy link
Contributor Author

The INPUT_NIX_FILE comes from a GitHub Action specific convention. The variables available to the action are set in action.yml. There, you can see that nix_file should be defined by the user. Then, GitHub Actions converts nix_file into the environment variable INPUT_NIX_FILE.

Thanks for this explanation!
I wonder what went wrong, because I did provide the nix_file. I will try again later a bit more carefully and report it to you with a proper example if the issue persists.

@CohenCyril
Copy link
Contributor Author

I guess there still is a discrepancy between the this and the documentation which says the variable is not required and defaults to default.nix.

@rikhuijzer
Copy link
Owner

I guess there still is a discrepancy between the this and the documentation which says the variable is not required and defaults to default.nix.

I don't see where the discrepancy could be introduced. Maybe, you run a different version? Could you explicitly try v1.0.7?

Do you have a public repository? Then, I could take a look there.

@CohenCyril
Copy link
Contributor Author

I guess there still is a discrepancy between the this and the documentation which says the variable is not required and defaults to default.nix.

I don't see where the discrepancy could be introduced. Maybe, you run a different version? Could you explicitly try v1.0.7?

Do you have a public repository? Then, I could take a look there.

Sure, thank you!
Here are two PR which fail, with v1.0.7 and where there is a default.nix at the root of the repo.

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

Successfully merging this pull request may close these issues.

2 participants