Skip to content

Installer keeps the user's TMPDIR #313

Closed

Description

@irzhywau

Part of #89.

Part of #311 (Group B, installer and update). Owner: not assigned. Task base and PR target: develop. Start after #312 merges (same file).

Intended behavior

The installer uses its own scratch directory, and every program it starts sees the user's original TMPDIR.

Current behavior

  • scripts/install.sh:1093 sets TMPDIR=$(mktemp -d). The traps at lines 1094 and 1205 remove that directory when the installer exits.
  • macOS exports TMPDIR by default, so the changed value reaches every child. These include elastos setup and the Home launch in finish_install (line 891).
  • The update controller captures TMPDIR in the launch environment it keeps for later Runtime starts (elastos/crates/elastos-server/src/update_controller.rs:60, 116).
  • The first Home session can therefore hold a temporary-directory path that the installer deletes when it exits.

Implementation notes

Rename the scratch variable, for example INSTALL_SCRATCH, everywhere in install.sh, and keep TMPDIR unchanged. publish-release.sh has its own TMPDIR handling and stays as it is.

Done means

Activity

  1. added this to the 0.8.0 milestone on Oct 9, 2026
  2. andersalm commented on Oct 13, 2026

    @andersalm
    Contributor

    Shipped in 0.8.0-alpha.15 (PR #343, source aa3d61e).

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions