Context
In src/template/source.rs (lines 25-40), detect_github_protocol shells out to gh on every gh: abbreviation expansion:
fn detect_github_protocol() -> String {
Command::new("gh")
.args(["config", "get", "git_protocol", "-h", "github.com"])
.output()
...
}
This also makes test behavior non-deterministic — tests must accept either SSH or HTTPS results.
Suggestion
Memoize with OnceLock or LazyLock so the subprocess is only called once per process.
Context
In
src/template/source.rs(lines 25-40),detect_github_protocolshells out toghon everygh:abbreviation expansion:This also makes test behavior non-deterministic — tests must accept either SSH or HTTPS results.
Suggestion
Memoize with
OnceLockorLazyLockso the subprocess is only called once per process.