filedust 0.5.1__tar.gz → 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {filedust-0.5.1 → filedust-0.5.2}/PKG-INFO +1 -1
- {filedust-0.5.1 → filedust-0.5.2}/pyproject.toml +1 -1
- {filedust-0.5.1 → filedust-0.5.2}/src/filedust/cli.py +4 -0
- {filedust-0.5.1 → filedust-0.5.2}/src/filedust/junk.py +9 -1
- {filedust-0.5.1 → filedust-0.5.2}/LICENCE +0 -0
- {filedust-0.5.1 → filedust-0.5.2}/README.md +0 -0
- {filedust-0.5.1 → filedust-0.5.2}/src/filedust/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "filedust"
|
|
3
|
-
version = "0.5.
|
|
3
|
+
version = "0.5.2"
|
|
4
4
|
description = "Opinionated junk cleaner for dev machines (caches, build artifacts, editor backups)."
|
|
5
5
|
authors = [{ name = "Marco D'Aleo", email = "marco@marcodaleo.com" }]
|
|
6
6
|
license = "GPL-3.0-or-later"
|
|
@@ -189,6 +189,10 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
189
189
|
console.print(f"[red]Error:[/] Path not found: {root}")
|
|
190
190
|
return 1
|
|
191
191
|
|
|
192
|
+
if not root.is_dir():
|
|
193
|
+
console.print(f"[red]Error:[/] Not a directory: {root}")
|
|
194
|
+
return 1
|
|
195
|
+
|
|
192
196
|
print("Looking for junk ...")
|
|
193
197
|
|
|
194
198
|
if root.resolve() == Path("/"):
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
|
+
import sys
|
|
4
5
|
import configparser
|
|
5
6
|
from dataclasses import dataclass
|
|
6
7
|
from fnmatch import fnmatch
|
|
@@ -21,7 +22,14 @@ def load_user_rules() -> UserRules:
|
|
|
21
22
|
if cfg_path.exists():
|
|
22
23
|
parser = configparser.ConfigParser(allow_no_value=True)
|
|
23
24
|
parser.optionxform = str
|
|
24
|
-
|
|
25
|
+
try:
|
|
26
|
+
parser.read(cfg_path)
|
|
27
|
+
except configparser.Error as exc:
|
|
28
|
+
print(
|
|
29
|
+
f"filedust: ignoring invalid config {cfg_path}: {exc}",
|
|
30
|
+
file=sys.stderr,
|
|
31
|
+
)
|
|
32
|
+
return rules
|
|
25
33
|
|
|
26
34
|
if parser.has_section("include"):
|
|
27
35
|
rules.include = list(parser["include"].keys())
|
|
File without changes
|
|
File without changes
|
|
File without changes
|