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

[CI] Don't update file while reading it #641

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

jerboaa
Copy link
Collaborator

@jerboaa jerboaa commented Dec 18, 2023

The pattern is cat <<< $(echo < input-file.txt) > input-file.txt which makes no guarantee that the input file, input-file.txt, isn't being clobbered while still being read by the subshell. Fix it by creating a temporary copy.

The pattern is 'cat <<< $(echo < input-file.txt) > input-file.txt' which makes no
guarantee that the input file isn't being clobbered while we still
being read. Fix it by creating a temporary copy.
@jerboaa jerboaa requested a review from zakkak December 18, 2023 13:35
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 18, 2023
@jerboaa
Copy link
Collaborator Author

jerboaa commented Dec 18, 2023

Should fix issues we see in CI recently like:

jq: error: Could not open file /home/runner/.docker/config.json: No such file or directory
/home/runner/work/_temp/67534cd0-b923-4d5f-8f56-3d5c23664ed6.sh: line 1: /home/runner/.docker/config.json: No such file or directory
Error: Process completed with exit code 1.

https://github.com/graalvm/mandrel/actions/runs/7247202176/job/19741559198?pr=638

@zakkak zakkak merged commit e654b69 into graalvm:default Dec 18, 2023
29 of 48 checks passed
zakkak added a commit to zakkak/mandrel that referenced this pull request Dec 18, 2023
jerboaa pushed a commit that referenced this pull request Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants