Check file path before Initialize crd
What type of PR is this? /kind bug
What this PR does / why we need it:
1.When we run karmadactl init --kube-image-registry=registry.cn-hangzhou.aliyuncs.com/google_containers --crds /root/crds.tar.gz
2.If the crds dir do not has patches or bases, like
$ ls crds
crd.yaml net.yaml
-
The output:

-
What do we expect: Command output file does not exist, and exit
Which issue(s) this PR fixes: Fixes #
Special notes for your reviewer:
The test result:

Does this PR introduce a user-facing change?:
Check if the file path exists before Initialize crd.
/cc @lonelyCZ @RainbowMango
/cc @prodanlabs
/assign @prodanlabs
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: To complete the pull request process, please ask for approval from prodanlabs after the PR has been reviewed.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Sorry for letting this sit. I think this is a reasonable improvement. @my-git9 would you like to rebase and re-open this PR? You can just assign it to me.
Sorry for letting this sit. I think this is a reasonable improvement. @my-git9 would you like to rebase and re-open this PR? You can just assign it to me.
Sure, thanks
/assign @RainbowMango
Yes, it seems that this PR has a lot of limitations
/close
Please reopen it if you think we still need it.
@RainbowMango: Closed this PR.
In response to this:
/close
Please reopen it if you think we still need it.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.