Skip to content

Commit 1b7099b

Browse files
committed
fix: fixed bootstrap 'dnmame' check
1 parent f3941a0 commit 1b7099b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

mamonsu/tools/bootstrap/start.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,7 @@ def __init__(self):
8080
try:
8181
cfg = Config(self.args.config)
8282
self.args.dbname = cfg.fetch('postgres', 'database')
83-
# apply dbname env
84-
os.environ['PGDATABASE'] = self.args.dbname
8583
except Exception as e:
86-
# apply dbname env
87-
os.environ['PGDATABASE'] = self.args.username
8884
sys.stderr.write("ERROR: Database for mamonsu is not specified\n")
8985
sys.stderr.write("{0}\n".format(e))
9086
parser.print_bootstrap_help()
@@ -95,6 +91,7 @@ def __init__(self):
9591
os.environ['PGPASSWORD'] = self.args.password
9692
os.environ['PGHOST'] = self.args.hostname
9793
os.environ['PGPORT'] = str(self.args.port)
94+
os.environ['PGDATABASE'] = self.args.username if self.args.dbname is None else self.args.dbname
9895
os.environ['PGAPPNAME'] = 'mamonsu deploy'
9996

10097
def try_configure_connect_to_pg(self):

0 commit comments

Comments
 (0)