Skip to content

Cleanup temporary files #35

Open
Open

Description

@ezrizhu

Do we want to cleanup the tempdir and tempfiles that we make?

Activity

  1. mgree commented on Jun 24, 2023

    @mgree
    Contributor

    If they're in /tmp we shouldn't need to care about it.

    I can imagine having some kind of trap 'cleanup' EXIT that would remove files if things borked before we ran the command. But once it's run, we shouldn't delete anything.

    Longer term, we'd like to be able to store and name try results by some SHA-like code, which means keeping them somewhere more durable.

  2. changed the title [-]cleanup[/-] on Jun 24, 2023
  3. mgree commented on Jun 24, 2023

    @mgree
    Contributor

    A good first issue:

    • Identify the temporary files we've created (the two shell scripts, tmp directory) and store them in a CLEANUP variable
    • Set a trap to remove them if, e.g., the calls to unshare or mount fail
    • After the command runs, disable the trap, leave the directory, and delete the shell scripts
  4. mgree commented on Apr 14, 2025

    @mgree
    Contributor

    #186 simplifies what needs to be done here: just drop the directory. What's not clear to me is: when exactly would we want to do that?

    Currently try-commit is destructive, so that's a good time to trash the directory. (as much as #93 permits).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions