mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-30 16:39:33 +01:00
A non-root account with a working passwordless sudo and no controlling terminal (su - user -c, cron, a CI runner, cloud-init) ended on "Failed to obtain sudo privileges". The /dev/tty node exists there and cannot be opened; install.sh tested [[ -e /dev/tty ]] and then ran sudo -v < /dev/tty, whose redirect fails before sudo starts. Measured 2026-11-27 in a fresh ubuntu:24.04 container: node present, open refused, sudo -n true fine, install dead at "Installing Git via apt". - tty_openable() opens the node, the probe has_tty() already used, and every redirect from /dev/tty now sits behind it instead of a file test: ensure_sudo, sudo_session_try, the message choice in sudo_session_start, and the three sites with the same shape (Homebrew, the Tailscale installer, tailscale up). With no terminal they fall back to the plain command. - ensure_sudo returns as soon as sudo -n true works. sudo -v is no substitute for that test: it asks for a password as soon as one sudoers entry of the account asks for one, so an account in the sudo group with a NOPASSWD entry of its own (the cloud-image layout) runs sudo <command> freely and is refused by sudo -v (measured on sudo 1.9.15). test/install-sh-invariants.test.ts fails for a file test on /dev/tty and for a redirect from it that is not directly under the probe, and drives the sudo helpers in a real bash with no controlling terminal against a stub sudo. Checked in a throwaway ubuntu:24.04 container, through su - user -c with CODEMAN_NONINTERACTIVE=1: the installer before this change stops at the sudo step, this one installs git, tmux, Node.js and the build tools, clones and was building when the check was stopped. The helpers were also run under bash 3.2.57. The Homebrew branch could not be run here (no macOS). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Changesets
Hello and welcome! This folder has been automatically generated by @changesets/cli, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can find
the full documentation for it in the repository.
What is a changeset?
A changeset is a piece of information about changes made in a branch or commit. It holds three bits of information:
- What packages need to be released
- What semver bump type each package should receive (major / minor / patch)
- A summary of the changes
How do I create a changeset?
Run npx changeset or create a .md file in this directory with the following format:
---
"codeman": patch
---
Description of changes
The frontmatter specifies which package(s) to bump and the bump type. The body is the changelog entry.