-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: migrate CLI to use cobra #114
base: main
Are you sure you want to change the base?
Conversation
The change seems to be working fine, I mostly was able to reproduce the same thing as Flag. If you could do some testing, I could be missing some corn-cases. Due to some changes the install changed a little bit, as we will still discuss this, I will not change on the README:
|
This test case is returning exit status 1 instead of 0: It is because in the "." path there is some "bad files", if I run the same command with the addition of |
The lint job failed on the latest pipeline. Need to fix. |
Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few items:
- We had a few merges prior to this one. Please resolve all conflicts
- During functional checkout I am having issues with generating a valid binary both on MacOS and in the Docker container.
>> docker run -v $(pwd)/test:/test cfv:cobra --depth 0 /test
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/validator": permission denied: unknown.
and macos
>> CGO_ENABLED=0 \
> GOOS=darwin \
> GOARCH=amd64 \
> go build \
> -ldflags='-w -s -extldflags "-static"' \
> -tags netgo \
> -o validator \
> cmd/validator/validator.go
>> ./validator --version
-bash: ./validator: Permission denied
Main does not have this problem so I'm not sure if this is a byproduct of Cobra
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@1garo Your PR did not properly resolve conflicts in your last update. I started to go through them all but you should get the idea on the rest. It looks like you rejected all upstream conflicts and just kept your code which is now trying to overwrite existing changes
@1garo Why was -search_path added back rather than treating it as a positional argument? Search path should remain a positional argument To clarify, this now fails:
and instead I have to do this:
|
Co-authored-by: Clayton Kehoe <[email protected]>
Co-authored-by: Clayton Kehoe <[email protected]>
fixed at 8a5c705
|
Cross Platform tool to validate configuration files | ||
|
||
Usage: | ||
validator [flags] | ||
validator [command] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You think we should maintain this comment here? Since running -h already outputs the usage?
Closes #112