doomemacs / doomemacs/core

`(wrong-type-argument stringp nil)` error when cloning a package during `doom {install,upgrade}`

Open
#5,918 15 comments 42 reactions 0 assignees View on GitHub
faq re:networking re:straight
Dominant language
Emacs Lisp
Stars
22.7k
Forks
3.1k
Avg merge
10h 46m
Merged PRs (30d)
4

Description

### What did you expect to happen?

When running `doom upgrade`, I'd expect my packages to be upgraded to the latest version.

### What actually happened?

Instead I receive the following error:

```
./doom sync
> Installing straight...
> Cloning use-package...
> Executing 'doom sync' with Emacs 27.2 at 2021-12-20 09:33:45
> Synchronizing your config with Doom Emacs...
> Regenerating envvars file at "~/.emacs.d/.local/env"
✓ Successfully generated "~/.emacs.d/.local/env"
x There was an unexpected error
Message: Wrong type argument
Error: (wrong-type-argument stringp nil)
Backtrace:
(string-match "^.*/\\(.+\\)\\.git$" nil)
(if (string-match regexp repo) (progn (match-string 1 repo)))
(let ((regexp "^.*/\\(.+\\)\\.git$")) (if (string-match regexp repo) (prog...
(if host (replace-regexp-in-string "^.+/" "" repo) (let ((regexp "^.*/\\(....
(let* ((--cl-rest-- recipe) (repo (car (cdr (plist-member --cl-rest-- ':re...
(straight-vc-git-local-repo-name (:files ("graphql" "code-review*.el") :pa...
(apply straight-vc-git-local-repo-name (:files ("graphql" "code-review*.el...
(let ((func (intern (format "straight-vc-%S-%S" type method)))) (if (fboun...
(straight-vc local-repo-name git (:files ("graphql" "code-review*.el") :pa...
(let* ((--cl-rest-- recipe) (type (car (cdr (plist-member --cl-rest-- ':ty...
! Extended backtrace logged to ~/.emacs.d/.local/doom.error.log
```

The error log can be found here: https://pastebin.com/VQQR8R0N

`doom upgrade` works as expected when removing the `magit` entry from init.el

### Describe your attempts to resolve the issue

I tried removing repositories I assumed affected with `rm -rf ~/.emacs.d/.local/straight/repos/...`, but the error persisted.

**Reinstalling Doom Emacs entirely worked in the end.**

### Steps to reproduce

- Enable the `magit` entry in `init.el`
- Run `doom upgrade`, `doom sync` or `doom install`

### System Information

https://pastebin.com/4wRMAQJn

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.