Skip to content

Commit cfaa3d1

Browse files
committed
feat: Add hint messages for compose environment variables
1 parent 15bc6cf commit cfaa3d1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

agent/app/service/snapshot.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,11 @@ func loadAppImage(list []dto.DataTree) []dto.DataTree {
299299

300300
for i := 0; i < len(list); i++ {
301301
itemAppImage := dto.DataTree{ID: uuid.NewString(), Label: "appImage"}
302-
stdout, err := cmd.RunDefaultWithStdoutBashCf("cat %s | grep image: ", list[i].Path)
302+
appPath := path.Join(global.Dir.DataDir, "apps", list[i].Key, list[i].Name)
303+
if list[i].IsLocal {
304+
appPath = path.Join(global.Dir.AppDir, "local", strings.TrimPrefix(list[i].Key, "local"), list[i].Name)
305+
}
306+
stdout, err := cmd.RunDefaultWithStdoutBashCf("cat %s | grep image: ", path.Join(appPath, "docker-compose.yml"))
303307
if err != nil {
304308
list[i].Children = append(list[i].Children, itemAppImage)
305309
continue

0 commit comments

Comments
 (0)