Skip to content

Ensure Uninstall CLI removes the global uloop binary #1123

@hatayama

Description

@hatayama

Background

This is about the Unity UI Uninstall CLI button, not Package Manager package removal.

After uninstalling the v3 uLoop CLI from Unity's UI, uloop --version can still report the v3 CLI. Manually deleting ~/.local/bin/uloop removes it, so the expected behavior is for the Unity uninstall flow to perform the equivalent cleanup for the package-owned global CLI.

Observed behavior

  1. Click the Unity UI Uninstall CLI button.
  2. In a terminal, run:
    which uloop
    uloop --version
  3. uloop may still resolve and report a v3 version such as 3.0.0-beta.7.
  4. Running this manually removes it:
    rm ~/.local/bin/uloop

Current code expectation

The uninstall path appears intended to delete the package-owned global binary:

  • UnityCliLoopSettingsWindow.HandleUninstallCli()
  • CliSetupApplicationFacade.UninstallGlobalCliAsync(...)
  • NativeCliInstaller.UninstallAsync(...)
  • NativeCliInstaller.UninstallGlobalCli(...)

NativeCliInstaller.UninstallGlobalCli(...) deletes GetGlobalCliInstallPath(installDirectory, platform), which should be ~/.local/bin/uloop on macOS by default.

Problem

Even though the code intends to delete the expected path, the UI can report success while the global CLI remains available. Possible causes include:

  • Unity and the user's shell resolving different install directories or environment variables.
  • ULOOP_INSTALL_DIR causing Unity to delete a different path than the shell uses.
  • Startup auto-install restoring the CLI after uninstall.
  • The uninstall flow not verifying that the detected global command is gone after deletion.

Expected behavior

Clicking Uninstall CLI should remove the package-owned global uloop command from the user's environment, equivalent to deleting ~/.local/bin/uloop on macOS default installs.

If the command still resolves after uninstall, the UI should not silently treat the operation as successful. It should surface what path was deleted, what path still resolves, and what the user should do next.

Acceptance criteria

  • Uninstall CLI removes the package-owned global binary on macOS default installs.
  • After uninstall, a fresh CLI detection should report no package-owned uloop command.
  • If another uloop remains earlier/later in PATH, the UI distinguishes that from the package-owned install.
  • If auto-install can restore the CLI immediately after uninstall, the uninstall flow prevents or clearly reports that behavior.
  • Add focused tests for the uninstall result verification path.

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