Skip to content

Commit 6b91605

Browse files
committed
fix: re-create the puppet.conf file if already exists
Signed-off-by: Sidharth Jawale <sidharth@obmondo.com>
1 parent 13c5c15 commit 6b91605

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/puppet/puppet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ noop = true
155155
environment = %s
156156
`
157157
content := fmt.Sprintf(cfg, s.openvoxServer, s.certName, s.openvoxEnv)
158-
if _, err := script.Echo(content).WriteFile(constant.PuppetConfig); err != nil {
158+
if err := os.WriteFile(constant.PuppetConfig, []byte(content), os.FileMode(os.O_TRUNC|os.O_CREATE)); err != nil {
159159
s.webtee.RemoteLogObmondo([]string{fmt.Sprintf("echo failed to configure puppet: %s", err)}, s.certName)
160160
os.Exit(1)
161161
}

0 commit comments

Comments
 (0)