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.
The
freeturtle updatecommand (insrc/cli/update.ts) attempts to runnpm install -g freeturtle@latest(or pnpm/yarn equivalent) directly.On many server environments (including the recommended Oracle Cloud setup), global package installations require
sudoprivileges. Without it, the update fails withEACCESor "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.
Suggested fix: Check for write permissions to the global node_modules or wrap the command in a retry logic that suggests sudo.