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

Do not cause error if parent of nested field (section) is missing #13

Open
adrianschmidt opened this issue May 5, 2023 · 0 comments · May be fixed by #12
Open

Do not cause error if parent of nested field (section) is missing #13

adrianschmidt opened this issue May 5, 2023 · 0 comments · May be fixed by #12

Comments

@adrianschmidt
Copy link

adrianschmidt commented May 5, 2023

When using this action to access a nested field, like in the example in the readme:

uses: SebRollen/[email protected]
id: read_toml
with:
  file: 'myfile.toml'
  field: 'package.version'

If the package section of the TOML file is missing, this action produces an error.

I would like the action to instead return an empty value. The reason for this is that once the step using this action has errored, the workflow has failed, and there is, to my knowledge, nothing that I can do to "ignore" that error.

If it's useful to some users that the action indeed produces an error, the behaviour could be controlled by a parameter.

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 a pull request may close this issue.

1 participant