瀏覽代碼

Fix typo in warning about existing volume

Previously, this was telling us "but was not created for project
[project-it-was-created-for]", which is wrong. I opted to make the
message super explicit and print both the actual project and the
expected project.

Signed-off-by: Jeremy Fleischman <[email protected]>
Jeremy Fleischman 2 年之前
父節點
當前提交
3d05a1becf
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pkg/compose/create.go

+ 1 - 1
pkg/compose/create.go

@@ -1194,7 +1194,7 @@ func (s *composeService) ensureVolume(ctx context.Context, volume types.VolumeCo
 		logrus.Warnf("volume %q already exists but was not created by Docker Compose. Use `external: true` to use an existing volume", volume.Name)
 	}
 	if ok && p != project {
-		logrus.Warnf("volume %q already exists but was not created for project %q. Use `external: true` to use an existing volume", volume.Name, p)
+		logrus.Warnf("volume %q already exists but was created for project %q (expected %q). Use `external: true` to use an existing volume", volume.Name, p, project)
 	}
 	return nil
 }