You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running golem::create_golem in an existing directory under git version control corrupts the git index, which is a fatal error completely breaking the repo.
To reproduce: run golem::create_golem() in a non-empty git repository.
mkdir golem.repro
cd golem.repro
git init
echo Golem repro > README
git add .
git commit -m "Initial commit"
git status
# On branch master
# nothing to commit, working tree clean
# Now go run `golem::create_golem("path/to/golem.repro")` in R and overwrite
# (Cannot run in console since overwriting requires an interactive session)
git status
# error: bad index version 175051126
# fatal: index file corrupt
The fix is ignoring the .git directory in create_golem. In fact, if you want to support running create_golem on an existing shiny app (which you totally should, it is a standard use case to want to convert a normal shiny app to a golem app), you need to be more careful in create_golem.
A better fix would be to modify the package name on the fly as the files are copied instead of copying the shinyexample app then listing all the files (which will list existing files instead of just the copied one).
The text was updated successfully, but these errors were encountered:
Running
golem::create_golem
in an existing directory under git version control corrupts the git index, which is a fatal error completely breaking the repo.To reproduce: run
golem::create_golem()
in a non-empty git repository.The fix is ignoring the
.git
directory increate_golem
. In fact, if you want to support runningcreate_golem
on an existing shiny app (which you totally should, it is a standard use case to want to convert a normal shiny app to a golem app), you need to be more careful increate_golem
.A better fix would be to modify the package name on the fly as the files are copied instead of copying the shinyexample app then listing all the files (which will list existing files instead of just the copied one).
The text was updated successfully, but these errors were encountered: