mirror of
https://github.com/serokell/deploy-rs.git
synced 2024-09-11 10:45:29 +03:00
Merge pull request #198 from serokell/rvem/#197-fix-options-handling-with-remote-build
[#197] Fix hostname overriding for remote builds
This commit is contained in:
commit
c2ea4e642d
14
src/push.rs
14
src/push.rs
@ -155,14 +155,12 @@ pub async fn build_profile_remotely(data: &PushProfileData<'_>, derivation_name:
|
||||
data.deploy_data.profile_name, data.deploy_data.node_name
|
||||
);
|
||||
|
||||
let store_address = format!("ssh-ng://{}@{}",
|
||||
if data.deploy_data.profile.generic_settings.ssh_user.is_some() {
|
||||
&data.deploy_data.profile.generic_settings.ssh_user.as_ref().unwrap()
|
||||
} else {
|
||||
&data.deploy_defs.ssh_user
|
||||
},
|
||||
data.deploy_data.node.node_settings.hostname
|
||||
);
|
||||
// TODO: this should probably be handled more nicely during 'data' construction
|
||||
let hostname = match data.deploy_data.cmd_overrides.hostname {
|
||||
Some(ref x) => x,
|
||||
None => &data.deploy_data.node.node_settings.hostname,
|
||||
};
|
||||
let store_address = format!("ssh-ng://{}@{}", data.deploy_defs.ssh_user, hostname);
|
||||
|
||||
let ssh_opts_str = data.deploy_data.merged_settings.ssh_opts.join(" ");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user