reduce dups

This commit is contained in:
2026-02-20 14:44:48 -06:00
parent 601a78b3c7
commit 4ac92c8a87
16 changed files with 232 additions and 635 deletions

View File

@@ -17,7 +17,6 @@ var target_pkg = null
var prune = false
var dry_run = false
var i = 0
var resolved = null
for (i = 0; i < length(args); i++) {
if (args[i] == '--prune') {
@@ -43,13 +42,7 @@ if (!target_pkg) {
$stop()
}
// Resolve relative paths to absolute paths
if (target_pkg == '.' || starts_with(target_pkg, './') || starts_with(target_pkg, '../') || fd.is_dir(target_pkg)) {
resolved = fd.realpath(target_pkg)
if (resolved) {
target_pkg = resolved
}
}
target_pkg = shop.resolve_locator(target_pkg)
var packages_to_remove = [target_pkg]