nogh

package
v1.2.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package nogh installs a refusing gh command first on a child shell's PATH. The child returns requested forge actions to its coordinator and uses git for branch transport where permitted. This shim makes that routing visible when the child invokes gh by name.

This is a command-routing aid, not a security boundary: an absolute path bypasses PATH lookup. Callers remain responsible for the child's permissions and credentials.

Index

Constants

View Source
const Name = "gh"

Name is the file the shim is written as.

View Source
const Refusal = "gh: REFUSED GitHub CLI is unavailable in this child shell; " +
	"return the requested forge action in your report to the coordinator; use git for branch transport where permitted"

Refusal is the one line the refusing gh prints on stderr. It carries no single quote, so Script can quote it for sh as written.

Variables

This section is empty.

Functions

func Install

func Install(dir string) (string, error)

Install puts the refusing gh at <dir>/gh (making dir) and returns its path. The file is written under a unique name and renamed into place, so two children starting at once never exec a half-written file. On windows no shim is written and the path is "".

func Script

func Script() string

Script is the refusing gh's whole text.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL