Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions cmd/duo/main.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Command duo is the entrypoint for the duo CLI. It does nothing beyond
// constructing the root command, calling Execute, and mapping the result to
// an exit code — every other concern belongs to internal/cli and the verb
// packages it registers.
// Command duo is the entrypoint for the duo CLI. Apart from the explicitly
// configured portable-launcher command recorder, it only constructs the root
// command, calls Execute, and maps the result to an exit code.
package main

import (
"os"

"github.com/procrastivity/duo/internal/buildinfo"
"github.com/procrastivity/duo/internal/cli"
"github.com/procrastivity/duo/internal/conformance/portablelauncher"
"github.com/procrastivity/duo/internal/iostreams"
)

Expand All @@ -23,6 +23,10 @@ var (
)

func main() {
if recorded, exitCode := portablelauncher.RecordCommandIfConfigured(); recorded {
os.Exit(exitCode)
}
// Keep the ordinary execution path unchanged when recording is disabled.
streams := iostreams.System()
build := buildinfo.Info{Version: version, Commit: commit, Date: date}
root := cli.NewRootCommand(streams, build)
Expand Down
8 changes: 7 additions & 1 deletion contracts/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@ aee7bfbbdc4aab9905b44e30790d040e23e727e77f054e3d3c26c961ff62dc5b fixtures/duo-e
2b80a74b759ca5fc7a32b1e68b95b34d983514faf31b64fbb13bd9fce5315ad1 fixtures/duo-external-v1/version-conflict.json
52e67bdca02355281e9a671865cbbf24d1a66938a44f214529214aa9528fcff4 fixtures/duo-external-v1/working-mode-effective.json
b93d2aa95138b1896ddc9d56d63ea890f5ba1a72bc275d63a1530bfc19214674 fixtures/duo-external-v1/working-mode-selected.json
045edb8695b91fd54b3d792ef5cda267f0b812a1d44765ad7290091080ca67e1 fixtures/duo-portable-launcher-conformance-v1/blobs/045edb8695b91fd54b3d792ef5cda267f0b812a1d44765ad7290091080ca67e1.json
19ee7895766722228160ab602b9a937e9d630b5d0a66484478695b2cf67fc5b9 fixtures/duo-portable-launcher-conformance-v1/evidence-index.json
516d77e6520cb9c5ae8acf70c38707d10d101f14eddc14d75e233191f34e9804 fixtures/duo-portable-launcher-conformance-v1/result-rejected-fabricated-pass.json
bf23f142b457635dd864f369d5bce20d16cccbf50c4e64dc8d502016a8197fad fixtures/duo-portable-launcher-conformance-v1/result-structural-blocked.json
01e8e6bd80ceb441be6dc128aca023a1bede31b655e74b12ee3da0c2fc6cc204 fixtures/duo-portable-launcher-conformance-v1/scenario.json
eb0894e6eb15b8972da2fbcb5608c07e60daf4508d43aa3bee770bcb432e1977 schemas/duo-config-v1.schema.json
2c6b98a2769c11e2876fe56275beeca1e0440d10555c037965be2c7dbc3e2c82 schemas/duo-config-v2.schema.json
d1a2fd1be5339c5699a21cf65616a4d09ff932a5495111d02a422b7656086842 schemas/duo-config-v3.schema.json
8b055ff60f0ca5f3da46302671591aa0dae61185cd9f1f15fcceb36d841e7497 schemas/duo-external-v1.schema.json
0e580adec7e8ad7e75b8c103ab8eebbc27beff934f6747cc9bda983ab90cb73f schemas/duo-manifest-v1.schema.json
413fbe9c86614b80369814cb20a60f5e9513461294ef40acbceb5c951a1f2e4f schemas/duo-portable-launcher-conformance-result-v1.schema.json
388e3918e7b1421e341317c81f2c1754bd06d594b946d045a3a68e18adaf6acb schemas/duo-projection-conformance-v1.schema.json
238c56beae5fe97dfc774f9c54229ac9f26f964a1b9c42c59d0f66f37f8bdf91 schemas/duo-projection-stamp-v1.schema.json
0baeff3cf3510feb474539805502536367ce9511b79c73f0586af3054b6cc827 schemas/duo-projection-stamp-v1.schema.json
Loading
Loading