Skip to content

bug: freeturtle update fails on systems requiring sudo for global installs #27

@FreeTurtle7

Description

@FreeTurtle7

The freeturtle update command (in src/cli/update.ts) attempts to run npm install -g freeturtle@latest (or pnpm/yarn equivalent) directly.

On many server environments (including the recommended Oracle Cloud setup), global package installations require sudo privileges. Without it, the update fails with EACCES or "permission denied" errors.

The command should probably detect if it needs sudo or provide a clearer error message instructing the user to run the update manually with sudo if it fails.

  const cmd = pm === "pnpm"
    ? "pnpm install -g freeturtle@latest"
    : pm === "yarn"
      ? "yarn global add freeturtle@latest"
      : "npm install -g freeturtle@latest";

Suggested fix: Check for write permissions to the global node_modules or wrap the command in a retry logic that suggests sudo.

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