This commit is contained in:
2026-01-09 07:36:48 -06:00
parent d044bde4f9
commit e04b15973a
3 changed files with 108 additions and 9 deletions

View File

@@ -79,12 +79,20 @@ log.console("Installing " + locator + "...")
// Gather all packages that will be installed
var packages_to_install = []
var skipped_packages = []
var visited = {}
function gather_packages(pkg_locator) {
if (visited[pkg_locator]) return
visited[pkg_locator] = true
// Check if this is a local path that doesn't exist
if (pkg_locator.startsWith('/') && !fd.is_dir(pkg_locator)) {
skipped_packages.push(pkg_locator)
log.console(" Skipping missing local package: " + pkg_locator)
return
}
packages_to_install.push(pkg_locator)
// Try to read dependencies
@@ -123,6 +131,13 @@ if (dry_run) {
var exists = lock[p] != null
log.console(" " + p + (exists ? " (already installed)" : ""))
}
if (skipped_packages.length > 0) {
log.console("")
log.console("Would skip (missing local paths):")
for (var p of skipped_packages) {
log.console(" " + p)
}
}
$stop()
}
@@ -150,6 +165,10 @@ for (var p of packages_to_install) {
install_package(p)
}
log.console("Installed " + text(packages_to_install.length) + " package(s).")
var summary = "Installed " + text(packages_to_install.length) + " package(s)."
if (skipped_packages.length > 0) {
summary += " Skipped " + text(skipped_packages.length) + " missing local path(s)."
}
log.console(summary)
$stop()