-
Notifications
You must be signed in to change notification settings - Fork 528
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
Implement crane edit #1403
Implement crane edit #1403
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1403 +/- ##
==========================================
- Coverage 74.15% 73.40% -0.76%
==========================================
Files 114 115 +1
Lines 8455 8758 +303
==========================================
+ Hits 6270 6429 +159
- Misses 1579 1687 +108
- Partials 606 642 +36
Continue to review full report at Codecov.
|
d7d0e94
to
9af1103
Compare
cmd/crane/cmd/edit.go
Outdated
return nil, err | ||
} | ||
if _, ok := ref.(name.Digest); ok { | ||
dst = fmt.Sprintf("%s@%s", ref.Context(), digest) |
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.
nit: ref.Context().Digest(digest)
all over the place
This works at least on linux with neovim. If stdin appears to be interactive, crane edit will open an editor with the contents of the target manifest/config/file. Otherwise, crane edit will read the desired contents from stdin and just overwrite them for the target.
This works at least on linux with neovim. If stdin appears to be
interactive, crane edit will open an editor with the contents of the
target manifest/config/file. Otherwise, crane edit will read the desired
contents from stdin and just overwrite them for the target.