feat(compile): add --force flag to bypass GitHub-remote guard#577
Merged
Conversation
Mirrors the existing 'ado-aw init --force' escape hatch on the compile subcommand so maintainers can compile pipelines inside 'githubnext/ado-aw' (or any GitHub-hosted fork) without setting CARGO_BIN_EXE_ado-aw. Also clarifies the guard's error message to mention --force as the bypass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
🔍 Rust PR ReviewSummary: Looks good — clean, minimal change that exactly mirrors the existing Findings✅ What Looks Good
No issues found.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
--forceflag toado-aw compile, mirroring the existingado-aw init --forceescape hatch. Maintainers can now compile pipelines insidegithubnext/ado-awitself (or any GitHub-hosted fork) without needing to setCARGO_BIN_EXE_ado-awto bypass the GitHub-remote guard.Previously the guard refused every
ado-awcommand in a GitHub repository exceptinit(which already had--force). That made it awkward to dogfood the compiler against the project's own examples and smoke pipelines from a regular shell.Changes
src/main.rsforce: boolto theCompileclap variant (#[arg(long)]).ensure_non_github_remote_for_ado_aw("compile", …)call behindif !force, identical to the existinginitdispatch pattern.--forceas the supported bypass.docs/cli.md— document the new--forceflag under thecompileentry.Verification
cargo build— clean.cargo test --bin ado-aw— 1466 passed, 0 failed (existingis_github_remotetests still pass).cargo run -- compile -h—--forcenow appears in the help output.Usage