ocm-container configure init fails to save the config file when the folder ~/.config/ocm-container doesn't exist.
This PR fixes it by adding the equivalent of mkdir -p "$(dirname "$cfgFile")" before the call to viper.WriteConfig()
Edit: sorry for reformatting the unrelated else-statement. I couldn't resist! :sweat_smile:
Needs approval from an approver in each of these files:
- ~~[OWNERS](https://github.com/openshift/ocm-container/blob/master/OWNERS)~~ [T0MASD]
Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
Hey :)
ocm-container configure init
fails to save the config file when the folder~/.config/ocm-container
doesn't exist. This PR fixes it by adding the equivalent ofmkdir -p "$(dirname "$cfgFile")"
before the call toviper.WriteConfig()
Edit: sorry for reformatting the unrelated else-statement. I couldn't resist! :sweat_smile: