mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
Fix missing secret error message
Add a warning message when the secret file doesn't exist Fixes #5920 Signed-off-by: Marian Gappa <marian.gappa@gmail.com>
This commit is contained in:
parent
1566930a70
commit
b9092cacdb
@ -6,6 +6,7 @@ import logging
|
||||
import operator
|
||||
import re
|
||||
from functools import reduce
|
||||
from os import path
|
||||
|
||||
import enum
|
||||
import six
|
||||
@ -807,7 +808,15 @@ def get_secrets(service, service_secrets, secret_defs):
|
||||
)
|
||||
)
|
||||
|
||||
secrets.append({'secret': secret, 'file': secret_def.get('file')})
|
||||
secret_file = secret_def.get('file')
|
||||
if not path.isfile(str(secret_file)):
|
||||
log.warn(
|
||||
"Service \"{service}\" uses an undefined secret file \"{secret_file}\", "
|
||||
"the following folder is created \"{secret_file}\"".format(
|
||||
service=service, secret_file=secret_file
|
||||
)
|
||||
)
|
||||
secrets.append({'secret': secret, 'file': secret_file})
|
||||
|
||||
return secrets
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user