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

@@ -15,7 +15,6 @@
var shop = use('internal/shop')
var pkg = use('package')
var link = use('link')
var fd = use('fd')
var json = use('json')
var target_locator = null
@@ -23,7 +22,6 @@ var format = 'tree'
var show_locked = false
var show_world = false
var i = 0
var resolved = null
for (i = 0; i < length(args); i++) {
if (args[i] == '--format' || args[i] == '-f') {
@@ -127,13 +125,7 @@ if (show_world) {
target_locator = '.'
}
// Resolve local paths
if (target_locator == '.' || starts_with(target_locator, './') || starts_with(target_locator, '../') || fd.is_dir(target_locator)) {
resolved = fd.realpath(target_locator)
if (resolved) {
target_locator = resolved
}
}
target_locator = shop.resolve_locator(target_locator)
push(roots, target_locator)
}