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 modify files if parsing fails #53

Merged
merged 1 commit into from
Apr 26, 2024
Merged

Conversation

neuroid
Copy link
Contributor

@neuroid neuroid commented Mar 5, 2024

What does this do / why do we need it?

Consider the following example:

$ cat file
${UNDECLARED}
$ ep file
2024/03/05 21:33:31 [ ERROR ] 'file' requires undeclared environment variable 'UNDECLARED', no default is given
2024/03/05 21:33:31 [ ERROR ] Error while parsing 'file': 'file' requires undeclared environment variable 'UNDECLARED', no default is give
$ echo $?
1
$ cat file

$

I would expect the file to not be modified since the command resulted in an error.

How this PR fixes the problem?

The proposed change aborts writing the modified buffer if any errors occurred.

What should your reviewer look out for in this PR?

N/A

Check lists

  • Test passed
  • Coding style (indentation, etc)

Additional Comments (if any)

N/A

Which issue(s) does this PR fix?

N/A

@neuroid
Copy link
Contributor Author

neuroid commented Mar 13, 2024

Hi @mavogel 👋 Is this something you would be interested in merging?

@enc
Copy link
Contributor

enc commented Mar 13, 2024

I will have a look into the pipeline later. Thank you for reminding us.

@enc enc merged commit 163b12b into kreuzwerker:master Apr 26, 2024
2 of 3 checks passed
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