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

This action should validate all the parameters it's given #35

Open
autarch opened this issue Dec 4, 2024 · 4 comments
Open

This action should validate all the parameters it's given #35

autarch opened this issue Dec 4, 2024 · 4 comments

Comments

@autarch
Copy link
Member

autarch commented Dec 4, 2024

In #34, the issue was that command was set to an empty string. It'd be nice if this action validate the arguments it's given and gave a clear error if they aren't valid.

@ali77gh
Copy link

ali77gh commented Dec 5, 2024

Yea we defiantly need this.
need any help?

@autarch
Copy link
Member Author

autarch commented Dec 7, 2024

If you'd like to work on a PR, that'd be great. I think the easiest way to do this is to write a shell script that accepts all the parameters and validates them. I think validation rules are:

  • working-directory - check that this path exists and is a directory
  • command - one of the allowed options
  • target - a valid target per rustup
    • I'm not sure of the best way to check this. This needs to happen before running dtolnay/rust-toolchain@master.
  • GITHUB_TOKEN - not sure what the validation rules are for this
  • strip - true or false
  • cross-version - a Git commit or a tag in the form of vX.Y.Z
  • cache-cross-binary - true or false

@autarch autarch changed the title This action should validate all the parameter it's given This action should validate all the parameters it's given Dec 14, 2024
@autarch
Copy link
Member Author

autarch commented Dec 22, 2024

I ended up doing this as part of some other work. It's available in the v1.0.0-beta1 release, which I hope to mark stable in the next few weeks.

@ali77gh
Copy link

ali77gh commented Dec 22, 2024

Oh cool. I checked out project and I did not find out where should I add this feature and what should I do.

Happy to hear It's fixed now.

Thanks

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

No branches or pull requests

2 participants