aboutsummaryrefslogtreecommitdiffstats
path: root/src/c_parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/c_parse.go')
-rw-r--r--src/c_parse.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/c_parse.go b/src/c_parse.go
index faa8223..3a58558 100644
--- a/src/c_parse.go
+++ b/src/c_parse.go
@@ -58,7 +58,8 @@ import (
"gopkg.in/yaml.v3"
)
-func c_read_yaml_file(file string, ui *HardUI) (*HostNode, error) {
+func c_read_yaml_file(file string,
+ opts HardOpts, ui *HardUI) (*HostNode, error) {
var host HostNode
yaml_file, err := os.ReadFile(file)
@@ -68,6 +69,9 @@ func c_read_yaml_file(file string, ui *HardUI) (*HostNode, error) {
if err := yaml.Unmarshal(yaml_file, &host); err != nil {
return nil, err
}
+ if len(opts.GPG) == 0 {
+ host.Pass = ""
+ }
if len(host.Name) == 0 {
return nil, nil
}