Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doom sync -u deletes $EMACSDIR/bin and leaves Doom in broken state #7802

Open
4 tasks done
liar666 opened this issue Apr 8, 2024 · 1 comment
Open
4 tasks done

doom sync -u deletes $EMACSDIR/bin and leaves Doom in broken state #7802

liar666 opened this issue Apr 8, 2024 · 1 comment
Labels
is:bug Something isn't working as intended module:core:cli Pertains to the `$ doom` script

Comments

@liar666
Copy link

liar666 commented Apr 8, 2024

I confirm that...

  • I have searched the issue tracker, documentation, FAQ, Discourse, and Google, in case this issue has already been reported/resolved.
  • I have read "How to Debug Issues", and will use it to provide as much information about this issue as possible.
  • The issue can be reproduced on the latest available commit of Doom.
  • The issue can be reproduced on a stable release of Emacs, such as 27, 28, or 29. (Unstable versions end in .50, .60, or .9x)

Expected behavior

running doom sync -u should work flawlessly

Current behavior

DOOM SYNC IS VERY DANGEROUSLY BROKEN AS IT RECURSIVELY DELETES ../!!!!

Running doom sync -u lead to some master/HEAD errors for some repos. I corrected them by deleting $DOOM_HOME/.local/straight/[build,repos}... then re running doom sync -u, but when I do I get "doom: command not found" & indeed, $DOOM_HOME/bin has desappeared. I had to clone the doom repos then copy paste the files into my $DOOM_HOME after each error!!!

Steps to reproduce

  • Running doom sync -u
  • Get some master/HEAD errors for some repos (e.g. org-gcal, emacs-calfw...)
  • Correct them by deleting $DOOM_HOME/.local/straight/[build,repos}...
  • Re running doom sync -u
  • Observing that $DOOM_HOME/ contains almost only .local

Example of execution trace:

> Tangling your literate config...
  ✓ Done tangling 1 file(s)!
- Using Emacs 29.3 @ /usr/local/bin/emacs
> Synchronizing "default" profile...
  > Ensuring packages are installed and built...
    > Updating recipe repos...
    > Cloning read-aloud.el...macsmirror-mirror...
    > Building read-aloud...
    > Building tabnine...
    > Building flymake-languagetool...
    > Building keycast...
    ✓ Built 4 package(s)
  > Updating all packages (this may take a while)...
    > Repository "emacs-calfw" has a dirty worktree:
    
       M ../../../../LICENSE
       M ../../../../README.md
       D ../../../../read-aloud.el
      ?? ../../../
      ?? ../../../../bin/
      ?? ../../../../docs/
      ?? ../../../../early-init.el
      ?? ../../../../lisp/
      ?? ../../../../modules/
      ?? ../../../../profiles/
      ?? ../../../../shell.nix
      ?? ../../../../templates/

         1) Abort
         2) Stash changes
         3) Discard changes (Choose this if unsure)

      How to proceed? (1, 2, 3; don't know? Pick 3) 3
      Discard all local changes permanently? (y or n) y
    > In repository "emacs-calfw", remote "origin" has URL
      "https://github.com/gromnitsky/read-aloud.el.git"
    but recipe specifies a URL of
      "https://github.com/kiwanami/emacs-calfw.git"

         1) Abort
         2) Rename remote "origin" to "origin-2", re-create "origin" with correct URL, and fetch
         3) Rename remote "origin" manually, re-create it with correct URL, and fetch
         4) Delete remote "origin", re-create it with correct URL, and fetch (Choose this if unsure)
         5) Delete remote "origin", re-create it with manually set URL, and fetch

      How to proceed? (1, 2, 3, 4, 5; don't know? Pick 4) 4
      Really delete remote "origin"? (y or n) y
    > Repository "emacs-calfw" has a dirty worktree:
    
      ?? ../../../
      ?? ../../../../bin/
      ?? ../../../../docs/
      ?? ../../../../early-init.el
      ?? ../../../../lisp/
      ?? ../../../../modules/
      ?? ../../../../profiles/
      ?? ../../../../shell.nix
      ?? ../../../../templates/

         1) Abort
         2) Stash changes
         3) Discard changes (Choose this if unsure)

      How to proceed? (1, 2, 3; don't know? Pick 3) 

System Information

https://pastebin.com/tq2ERZx9

@liar666 liar666 added is:bug Something isn't working as intended needs-triage Issue hasn't been assessed yet labels Apr 8, 2024
@hlissner hlissner added module:core:cli Pertains to the `$ doom` script and removed needs-triage Issue hasn't been assessed yet labels Apr 8, 2024
@hlissner
Copy link
Member

hlissner commented Apr 8, 2024

  1. Is your config up somewhere I can see it?
  2. Have you set any of the following envvars anywhere: EMACSDIR, DOOMDIR, or DOOMLOCALDIR?
  3. Have you symlinked anything in or around your ~/.emacs.d and ~/.doom.d?
  4. Your doom/info says you're on commit c662366 (dated 2017-07-30) of Doom, but no such commit exists in our history, and 2017-07-30 seems so old it can't be right. What commit of Doom are you actually on?

@hlissner hlissner changed the title DANGEROUS BUG!!!! doom sync -u totally broken : deletes $DOOM_HOME/bin (+../../../) and breaks everything?!? doom sync -u deletes $EMACSDIR/bin and leaves Doom in broken state Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:bug Something isn't working as intended module:core:cli Pertains to the `$ doom` script
Projects
Status: Need info
Development

No branches or pull requests

2 participants