From 0714b972133b40bfa1e25a311158b29e7c05386a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Van=C3=AD=C4=8Dek?= Date: Fri, 28 Jul 2023 20:18:18 +0200 Subject: [PATCH] Debug getting mount points --- plugin.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin.go b/plugin.go index 6871325..ce839f2 100644 --- a/plugin.go +++ b/plugin.go @@ -145,6 +145,8 @@ func getWorkDirPath(p Plugin, ctx context.Context) (string, string, error) { return "", "", errors.Wrap(err, "failed to get our container id") } + fmt.Fprintf(os.Stdout, "Container ID = %s\n", cntrId); + // Find the proper mount cwd, err := os.Getwd() if err != nil { @@ -157,8 +159,10 @@ func getWorkDirPath(p Plugin, ctx context.Context) (string, string, error) { if err != nil { return "", "", errors.Wrap(err, "failed to inspect ourselves as a container") } + fmt.Fprintf(os.Stdout, "Container = %+v\n", cntr); + fmt.Fprintf(os.Stdout, "Mounts = %+v\n", cntr.Mounts); for _, i := range cntr.Mounts { - fmt.Fprintf(os.Stdout, "Source = %s Destination = %s\n", i.Source, i.Destination); + fmt.Fprintf(os.Stdout, "\tDestination = %s\n", i.Destination); if i.Destination == cwd { return i.Source, i.Destination, nil }