Skip to content

Commit

Permalink
fix(remote-access): remove existing file before writing to it
Browse files Browse the repository at this point in the history
  • Loading branch information
reubenmiller committed May 20, 2024
1 parent 02b2009 commit e965f4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Formula/tedge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def post_install
# system "#{bin}/c8y-remote-access-plugin", "--config-dir", "#{config_dir}", "--init"
# Workaround: create the file manually
remoteAccessHandlerFile = config_dir/"operations/c8y/c8y_RemoteAccessConnect"
rm_f remoteAccessHandlerFile
remoteAccessHandlerFile.write <<~EOS
[exec]
command = "#{HOMEBREW_PREFIX}/bin/c8y-remote-access-plugin --config-dir #{etc}/tedge"
Expand Down
1 change: 1 addition & 0 deletions scripts/tedge.rb.template
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class Tedge < Formula
# system "#{bin}/c8y-remote-access-plugin", "--config-dir", "#{config_dir}", "--init"
# Workaround: create the file manually
remoteAccessHandlerFile = config_dir/"operations/c8y/c8y_RemoteAccessConnect"
rm_f remoteAccessHandlerFile
remoteAccessHandlerFile.write <<~EOS
[exec]
command = "#{HOMEBREW_PREFIX}/bin/c8y-remote-access-plugin --config-dir #{etc}/tedge"
Expand Down

0 comments on commit e965f4c

Please sign in to comment.