{"record":{"id":"100eb55053a86c59","repo":"sinelaw/fresh","slug":"error-s-n","errorCode":null,"errorMessage":"[ERROR] %s\\n","messagePattern":"\\[ERROR\\] (.+?)\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/install.sh","lineNumber":94,"sourceCode":"#   END CONFIGURATION\n# ==============================================================================\n\n# --- Colors and Helpers ---\nRED='\\033[0;31m'\nGREEN='\\033[0;32m'\nBLUE='\\033[0;34m'\nYELLOW='\\033[1;33m'\nNC='\\033[0m' # No Color\n\n# Helpers below return values by echoing them, so a diagnostic left on stdout\n# would be captured as if it were the value.\nlog_info()    { printf \"${BLUE}[INFO]${NC} %s\\n\" \"$1\" >&2; }\nlog_success() { printf \"${GREEN}[SUCCESS]${NC} %s\\n\" \"$1\" >&2; }\nlog_warn()    { printf \"${YELLOW}[WARN]${NC} %s\\n\" \"$1\" >&2; }\n\n# `exit` inside $(...) ends only that subshell, so log_error is for top-level\n# paths; helpers whose output is captured return a status instead.\nlog_error()   { printf \"${RED}[ERROR]${NC} %s\\n\" \"$1\" >&2; exit 1; }\n\ncheck_cmd() { command -v \"$1\" >/dev/null 2>&1; }\n\nusage() {\n    cat <<EOF\nFresh Editor installer\n\nUsage: install.sh [--method=METHOD] [--no-desktop-integration]\n\nMethods:\n  auto      (default) universal build on Linux, Homebrew on macOS, Nix on NixOS\n  tarball   universal static build under ~/.local — self-updating, no root\n  deb       Debian/Ubuntu .deb from the latest release (needs root)\n  rpm       Fedora/RHEL/openSUSE .rpm from the latest release (needs root)\n  aur       Arch Linux, via the AUR\n  brew      Homebrew\n  nix       Nix profile\n  cargo     cargo install / cargo binstall","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/sinelaw/fresh/blob/67894ca5463dbd7a89bb31add4627c27d6b79d83/scripts/install.sh#L76-L112","documentation":"log_error in scripts/install.sh prints a red '[ERROR] <message>' line to stderr and then exits the installer with status 1. It is reserved for fatal top-level installer paths, since 'exit' inside command substitution would only kill a subshell — helpers capturing output return a status instead.","triggerScenarios":"Any fatal check in install.sh calling log_error: unsupported OS/architecture, missing required commands (curl/wget/uname), failed download of the release binary, or inability to write to the install prefix.","commonSituations":"Running the installer on an unsupported platform (e.g. unknown architecture or non-glibc Linux); no network access to the release host; curl/wget absent on a minimal container; insufficient permissions in the target install directory.","solutions":["Read the [ERROR] line on stderr — it names the fatal check that failed.","Install missing prerequisites (curl or wget) and re-run the installer.","Confirm your OS/architecture is a supported release target (uname -m).","Fix permissions or choose a writable install prefix, or run with appropriate privileges."],"exampleFix":"// minimal container missing curl\n// before: ./install.sh -> [ERROR] curl is required\n// after\napt-get update && apt-get install -y curl && ./install.sh","handlingStrategy":"validation","validationCode":"for cmd in curl wget uname tar; do command -v \"$cmd\" >/dev/null 2>&1 || { echo \"missing: $cmd\"; exit 1; }; done\ncase \"$(uname -m)\" in x86_64|aarch64) ;; *) echo \"unsupported arch\"; exit 1;; esac","typeGuard":null,"tryCatchPattern":"if ! ./install.sh; then echo \"installer exited $? — see [ERROR] line above\"; fi","preventionTips":["Read the [ERROR] line on stderr; log_error always names the failed check before exiting.","Pre-install curl/wget in minimal images before running the installer.","Run installers in CI on the same base image you deploy.","Check disk space and write permissions on the target prefix."],"tags":["shell","installation","installer"],"backgroundTag":"command-not-found","analyzedSha":"67894ca5463dbd7a89bb31add4627c27d6b79d83","analyzedAt":"2026-09-13T15:04:03.701Z","contentChangedAt":"2026-09-13T15:04:03.701Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}