File tree 1 file changed +1
-4
lines changed
1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -80,11 +80,7 @@ def __init__(self):
80
80
try :
81
81
cfg = Config (self .args .config )
82
82
self .args .dbname = cfg .fetch ('postgres' , 'database' )
83
- # apply dbname env
84
- os .environ ['PGDATABASE' ] = self .args .dbname
85
83
except Exception as e :
86
- # apply dbname env
87
- os .environ ['PGDATABASE' ] = self .args .username
88
84
sys .stderr .write ("ERROR: Database for mamonsu is not specified\n " )
89
85
sys .stderr .write ("{0}\n " .format (e ))
90
86
parser .print_bootstrap_help ()
@@ -95,6 +91,7 @@ def __init__(self):
95
91
os .environ ['PGPASSWORD' ] = self .args .password
96
92
os .environ ['PGHOST' ] = self .args .hostname
97
93
os .environ ['PGPORT' ] = str (self .args .port )
94
+ os .environ ['PGDATABASE' ] = self .args .username if self .args .dbname is None else self .args .dbname
98
95
os .environ ['PGAPPNAME' ] = 'mamonsu deploy'
99
96
100
97
def try_configure_connect_to_pg (self ):
You can’t perform that action at this time.
0 commit comments