Skip to content

install-cobc.sh removes all of /tmp, breaking other workflow steps #146

@adamtheturtle

Description

@adamtheturtle

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

  1. Have a workflow step that writes a file to /tmp before setup-cobol-action runs
  2. Run setup-cobol-action with a version other than 4.0 (so it builds from source)
  3. 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.:

rm -rf /tmp/gnucobol-*

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions