feat(miniooni): make CLI much more user friendly (#913)
Part of https://github.com/ooni/probe/issues/2184, because I wanted to allow swapping commands and options more freely. As a side effect, this PR closes https://github.com/ooni/probe/issues/2248. AFAICT, every usage that was legal before is still legal. What has changed seems the freedom to swap commands and options and a much better help that lists the available options.
This commit is contained in:
parent
7daa686c68
commit
0bc6aae601
38 changed files with 265 additions and 124 deletions
|
|
@ -13,7 +13,7 @@ import (
|
|||
|
||||
// acquireUserConsent ensures the user is okay with using miniooni. This function
|
||||
// panics if we do not have acquired the user consent.
|
||||
func acquireUserConsent(miniooniDir string, currentOptions Options) {
|
||||
func acquireUserConsent(miniooniDir string, currentOptions *Options) {
|
||||
consentFile := path.Join(miniooniDir, "informed")
|
||||
err := maybeWriteConsentFile(currentOptions.Yes, consentFile)
|
||||
runtimex.PanicOnError(err, "cannot write informed consent file")
|
||||
|
|
|
|||
Loading…
Reference in a new issue