project existence check: added error message

Signed-off-by: Mehrad Dadar <mehrad.dadar@gmail.com>
This commit is contained in:
Mehrad Dadar 2022-02-25 05:36:22 +03:30
parent 35f37cd1f7
commit 42c3adb236
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ func (s *composeService) projectFromName(containers Containers, projectName stri
Name: projectName,
}
if len(containers) == 0 {
return project, nil
return project, errors.New("no such project: " + projectName)
}
set := map[string]types.ServiceConfig{}
for _, c := range containers {