Skip to content

Commit

Permalink
Fixes #85 - precreates all pre-requisite directories if they're not t…
Browse files Browse the repository at this point in the history
…here (#87)
  • Loading branch information
autodidaddict authored Jan 24, 2024
1 parent a50a1dd commit 75bfbae
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion internal/node/prereq.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,20 @@ func CheckPreRequisites(config *NodeConfiguration) error {
return err
}
}
if config.ForceDepInstall || string(input) == "y\n" {
if config.ForceDepInstall || strings.ToUpper(string(input)) == "Y\n" {
var path string
for _, f := range r.files {
if r.directory == "" {
path = filepath.Dir(f.name)
} else {
path = r.directory
}
err = os.MkdirAll(path, 0755)
if err != nil {
return err
}
}

for _, iF := range r.initFuncs {
err := iF(r, config)
if err != nil {
Expand Down

0 comments on commit 75bfbae

Please sign in to comment.