Find user and host before loading the first config file

This commit is contained in:
Joscha 2019-12-09 17:40:47 +00:00
parent 0a40757bb9
commit a9b7d9ccf4
2 changed files with 4 additions and 3 deletions

View file

@ -63,7 +63,10 @@ class DefaultConfig:
return {name: d.value for name, d in self._values.items() if d.has_constant_value}
def to_config(self) -> "Config":
return Config(self.to_local_vars())
config = Config(self.to_local_vars())
config.user = get_user()
config.host = get_host()
return config
def to_config_file(self) -> str:
"""

View file

@ -126,8 +126,6 @@ class Processor:
config_copy = config.copy()
config_copy.target = target
config_copy.user = get_user()
config_copy.host = get_host()
try:
parser = Parser(