qmk / qmk/qmk_cli

[Bug] qmk setup fails with "fatal: Unable to read current working directory" when deleting existing qmk_firmware

Open
#253 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
187
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Describe the Bug

In freshly opened terminal (after curl -fsSL https://install.qmk.fm | sh), run qmk setup. When there is existing qmk firmware directory and you select the option to delete and reclone, it will fail.

It will succeed if attempted directly afterwards (but by then, the original qmk firmware directory was already deleted)

jack@Buzzoid ~ $ qmk setup
Ψ Found qmk_firmware at /home/jack/qmk_firmware.
What do you want to do?
        1. Delete and reclone qmk/qmk_firmware
        2. Delete and clone a different fork
        3. Keep it and continue
Please enter your choice: [3] 1
WARNING: This will delete your current qmk_firmware directory. Proceed? [y/N] y
Cloning into '/home/jack/qmk_firmware'...
fatal: Unable to read current working directory: No such file or directory
fatal: remote helper 'https' aborted session
☒ git clone exited 128
Additional Context?

log: qmksetuplog.txt

system: void linux
No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the qmk setup entry point and reproduce the failure in a freshly opened terminal with an existing qmk_firmware directory. Check the delete-and-reclone path, then verify that cloning succeeds after the directory is removed and that the reported working-directory error no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.