Description
The install-cobc.sh script runs cd /tmp/ && sudo rm -rf ./* after building GnuCOBOL from source. This deletes everything in /tmp, not just the files created by the action.
This breaks any workflow step that writes to /tmp before this action runs. In our case, a prior step writes a file list to /tmp/files-to-lint, which is then missing when a later step tries to read it.
Steps to reproduce
- Have a workflow step that writes a file to
/tmp before setup-cobol-action runs
- Run
setup-cobol-action with a version other than 4.0 (so it builds from source)
- Try to read the
/tmp file in a subsequent step — it no longer exists
Expected behavior
The action should only clean up its own build directory (e.g. the extracted tarball directory), not all of /tmp.
Suggested fix
Replace:
cd /tmp/ && sudo rm -rf ./*
With something scoped to the action's own files, e.g.:
Description
The
install-cobc.shscript runscd /tmp/ && sudo rm -rf ./*after building GnuCOBOL from source. This deletes everything in/tmp, not just the files created by the action.This breaks any workflow step that writes to
/tmpbefore this action runs. In our case, a prior step writes a file list to/tmp/files-to-lint, which is then missing when a later step tries to read it.Steps to reproduce
/tmpbeforesetup-cobol-actionrunssetup-cobol-actionwith a version other than4.0(so it builds from source)/tmpfile in a subsequent step — it no longer existsExpected behavior
The action should only clean up its own build directory (e.g. the extracted tarball directory), not all of
/tmp.Suggested fix
Replace:
With something scoped to the action's own files, e.g.:
rm -rf /tmp/gnucobol-*