Skip to content

miso clean: only in a project, and never $MISO_HOME - #27

Merged
dmjio merged 1 commit into
mainfrom
clean-only-in-a-project
Oct 23, 2026
Merged

dmjio merged 1 commit into
mainfrom
clean-only-in-a-project

Conversation

@dmjio

@dmjio dmjio commented Oct 23, 2026

Copy link
Copy Markdown
Member

The bug: miso clean removed dist/, public/ and .miso/ from whatever folder it ran in. It never checked for a miso.yml. In the home folder that deleted ~/.miso, the whole miso installation. In another kind of project, it deleted that project's public/ and dist/.

The fix:

  • It now runs only in a folder with a miso.yml; anywhere else it stops with an error and removes nothing.
  • Even inside a project, it leaves .miso/ alone when that folder is $MISO_HOME or where the tool is installed. That's the case for a project in ~ itself.

Checked with the built tool:

Situation Before After
home folder with ~/.miso and a public/ site both deleted error, nothing removed
a project dist/, public/, .miso/ removed same
a project in the home folder would delete ~/.miso dist/ and public/ removed, ~/.miso kept

Generated by Claude Code

miso clean removed dist/, public/ and .miso/ from whatever folder it ran
in, with no miso.yml needed.  In the home folder that removed ~/.miso, the
miso installation; in another kind of project, its public/ and dist/.

It now runs only where there is a miso.yml, and leaves .miso/ alone when it
is $MISO_HOME or where the tool is installed (a project in ~ itself).

Checked with the built tool:
- in a home folder with ~/.miso and a public/ site: before, both were
  removed; now it stops with an error and removes nothing
- in a project: dist/, public/ and .miso/ are removed, as before
- a project in the home folder: dist/ and public/ go, ~/.miso stays
@dmjio
dmjio merged commit 10a95c0 into main Oct 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant