Skip to content

Commit 12b4b0b

Browse files
fix: remove old bundled config files in mac install upgrade (#145)
### Description Remove old bundled config files in mac install upgrade. I thought `cp -fR` would be sufficient, but that's not the case! I wasn't able to understand why the functionality is how it is, but here's a simple example to show the issue: ```sh $ mkdir a && echo hello > a/test.txt && cp -R a b && cat b/test.txt hello $ echo goodbye > a/test.txt && cp -fR a b && cat b/test.txt hello $ cat a/test.txt goodbye ``` ### Checklist - [ ] Created tests which fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
1 parent a1673a0 commit 12b4b0b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/install_mac.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ sudo mkdir -p $observeagent_install_dir /usr/local/libexec /usr/local/bin /var/l
7878
sudo chmod +rw /var/lib/observe-agent/filestorage
7979

8080
# Copy all files to the install dir.
81-
sudo cp -f $tmp_dir/observe-agent $observeagent_install_dir/observe-agent
82-
sudo cp -fR $tmp_dir/config $observeagent_install_dir/config
83-
sudo cp -fR $tmp_dir/connections $observeagent_install_dir/connections
81+
sudo rm -rf $observeagent_install_dir/config $observeagent_install_dir/connections $observeagent_install_dir/observe-agent
82+
sudo cp $tmp_dir/observe-agent $observeagent_install_dir/observe-agent
83+
sudo cp -R $tmp_dir/config $observeagent_install_dir/config
84+
sudo cp -R $tmp_dir/connections $observeagent_install_dir/connections
8485
sudo chown -R root:wheel $observeagent_install_dir
8586

8687
# Initialize the agent config file if it doesn't exist

0 commit comments

Comments
 (0)