-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
display the location of OCI or GIT Compose stack download #12595
Conversation
15cca45
to
278455b
Compare
pkg/remote/git.go
Outdated
@@ -116,6 +121,9 @@ func (g gitRemoteLoader) Load(ctx context.Context, path string) (string, error) | |||
if stat.IsDir() { | |||
local, err = findFile(cli.DefaultFileNames, local) | |||
} | |||
if progress.Mode != progress.ModeQuiet && progress.Mode != progress.ModeJSON { | |||
_, _ = fmt.Fprintf(g.dockerCli.Out(), "Your compose stack %q is stored in %q\n", strings.TrimPrefix(path, prefix), local) |
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.
this message will print for every Git remote loaded by compose, including those involved by includes
Maybe better load project, then check if project.ComposeFiles[0]
is remote then print result of Dir(".")
as location where remote stack has been stored on disk
278455b
to
e67d8b8
Compare
cmd/compose/up.go
Outdated
func displayLocationRemoteStack(dockerCli command.Cli, project *types.Project, options buildOptions) { | ||
mainComposeFile := options.ProjectOptions.ConfigPaths[0] | ||
if ui.Mode != ui.ModeQuiet && ui.Mode != ui.ModeJSON { | ||
if strings.HasPrefix(mainComposeFile, remote.OciPrefix) || strings.HasPrefix(mainComposeFile, "git://") { |
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.
Better use remote.Accept
as Git support has a bunch of corner cases
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.
Done!
e67d8b8
to
684184c
Compare
Signed-off-by: Guillaume Lours <[email protected]>
684184c
to
7e8650a
Compare
What I did
Display a message with the location where the OCI artifact or GIT Compose stack were downloaded
Related issue
https://docker.atlassian.net/browse/APCLI-881
(not mandatory) A picture of a cute animal, if possible in relation to what you did
