Skip to content

Commit ca7b848

Browse files
Reviewed and applied copilot sugesstions about OUT_DIR & COMMIT_MESSAGE
Signed-off-by: Jaisheesh-2006 <[email protected]>
1 parent aa5ffab commit ca7b848

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

commands/fn/render/cmdrender.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func NewRunner(ctx context.Context, parent string) *Runner {
4949
c.Flags().StringVar(&r.resultsDirPath, "results-dir", "",
5050
"path to a directory to save function results")
5151
c.Flags().StringVarP(&r.dest, "output", "o", "",
52-
fmt.Sprintf("output resources are written to provided location. Allowed values: %s|%s|OUT_DIR_PATH", cmdutil.Stdout, cmdutil.Unwrap))
52+
fmt.Sprintf("output resources are written to provided location. Allowed values: %s|%s|<OUT_DIR_PATH>", cmdutil.Stdout, cmdutil.Unwrap))
5353

5454
c.Flags().Var(&r.RunnerOptions.ImagePullPolicy, "image-pull-policy",
5555
"pull image before running the container "+r.RunnerOptions.ImagePullPolicy.HelpAllowedValues())

pkg/lib/errors/resolver/pkg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func resolveNestedErr(err error, path string) (ResolvedResult, bool) {
8282
if errors.As(err, &deprecatedv1alpha2KptfileError) &&
8383
deprecatedv1alpha2KptfileError.Version == "v1alpha2" {
8484
msg := fmt.Sprintf("Error: Kptfile at %q has an old version (%q) of the Kptfile schema.\n", path, deprecatedv1alpha2KptfileError.Version)
85-
msg += "Please run \"kpt fn eval PKG_PATH -i ghcr.io/kptdev/krm-functions-catalog/fix:latest --include-meta-resources\" to upgrade the package and retry."
85+
msg += fmt.Sprintf("Please run \"kpt fn eval %q -i ghcr.io/kptdev/krm-functions-catalog/fix:latest --include-meta-resources\" to upgrade the package and retry.", path)
8686

8787
return ResolvedResult{
8888
Message: msg,

pkg/lib/errors/resolver/update.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ func (*updateErrorResolver) Resolve(err error) (ResolvedResult, bool) {
3737
if errors.As(err, &pkgNotGitRepoError) {
3838
//nolint:lll
3939
msg = fmt.Sprintf("Package %q is not within a git repository.", pkgNotGitRepoError.Path)
40-
msg += " Please initialize a repository using 'git init' and then commit the changes using 'git commit -m \"COMMIT_MESSAGE\"'."
40+
msg += " Please initialize a repository using 'git init' and then commit the changes using 'git commit -m \"<COMMIT_MESSAGE>\"'."
4141
}
4242

4343
var pkgRepoDirtyError *update.PkgRepoDirtyError
4444
if errors.As(err, &pkgRepoDirtyError) {
4545
msg = fmt.Sprintf("Package %q contains uncommitted changes.", pkgRepoDirtyError.Path)
46-
msg += " Please commit the changes using 'git commit -m \"COMMIT_MESSAGE\"'."
46+
msg += " Please commit the changes using 'git commit -m \"<COMMIT_MESSAGE>\"'."
4747
}
4848

4949
if msg != "" {

thirdparty/cmdconfig/commands/cmdeval/cmdeval.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func GetEvalFnRunner(ctx context.Context, parent string) *EvalFnRunner {
4747
}
4848
r.Command = c
4949
r.Command.Flags().StringVarP(&r.Dest, "output", "o", "",
50-
fmt.Sprintf("output resources are written to provided location. Allowed values: %s|%s|OUT_DIR_PATH", cmdutil.Stdout, cmdutil.Unwrap))
50+
fmt.Sprintf("output resources are written to provided location. Allowed values: %s|%s|<OUT_DIR_PATH>", cmdutil.Stdout, cmdutil.Unwrap))
5151
r.Command.Flags().StringVarP(
5252
&r.Image, "image", "i", "", "run this image as a function")
5353
r.Command.Flags().StringVar(

0 commit comments

Comments
 (0)