Skip to content

Commit

Permalink
cleanup additional legacy state
Browse files Browse the repository at this point in the history
- clean-rstudio script wasn't cleaning up crash-reporting settings and keybinding settings (and probably some other minor stuff) in v1.3 locations
  • Loading branch information
gtritchie committed Sep 14, 2020
1 parent eafaa92 commit 2a4eda2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/clean-rstudio
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ rm -f ~/.Rhistory

# global options
rm -rf ~/.config/rstudio
rm -rf ~/.r/rstudio

# settings and session state
rm -rf ~/.rstudio
Expand All @@ -24,6 +25,10 @@ rm -rf ~/.local/share/rstudio
# desktop state
rm -rf ~/.rstudio-desktop

# crash handler state
rm -f ~/.r/crash-handler-permission
rm -f ~/.r/crash-handler.conf

if [ "${PLATFORM}" = "Darwin" ]; then
# macOS desktop settings
defaults delete com.rstudio.desktop > /dev/null 2>&1 || true
Expand Down
9 changes: 9 additions & 0 deletions scripts/clean-rstudio.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ if EXIST "%localappdata%\RStudio\" (
if EXIST "%appdata%\RStudio\" (
rd /q /s "%appdata%\RStudio"
)
if EXIST "%localappdata%\R\crash-handler-permission" (
del "%localappdata%\R\crash-handler-permission"
)
if EXIST "%localappdata%\R\crash-handler.conf" (
del "%localappdata%\R\crash-handler.conf"
)

for /f "tokens=*" %%i in ('powershell /command "[System.Environment]::GetFolderPath([Environment+SpecialFolder]::MyDocuments)"') do set MyDocsDir=%%i
if EXIST "%MyDocsDir%\.RData" (
Expand All @@ -20,6 +26,9 @@ if EXIST "%MyDocsDir%\.RData" (
if EXIST "%MyDocsDir%\.Rhistory" (
del "%MyDocsDir%\.Rhistory"
)
if EXIST "%MyDocsDir%\.R\rstudio\" (
rd /q /s "%MyDocsDir%\.R\rstudio"
)
if EXIST "%MyDocsDir%\.Renviron" (
echo Note: "%MyDocsDir%\.Renviron" found, not deleting
)
Expand Down

0 comments on commit 2a4eda2

Please sign in to comment.