switch to length fn

This commit is contained in:
2026-01-18 10:35:05 -06:00
parent e695810e64
commit 98cb2c3239
31 changed files with 184 additions and 185 deletions

View File

@@ -13,7 +13,7 @@ var shop = use('internal/shop')
// Parse arguments
var target_pkg = null
for (var i = 0; i < args.length; i++) {
for (var i = 0; i < length(args); i++) {
if (args[i] == '--help' || args[i] == '-h') {
log.console("Usage: cell fetch [package]")
log.console("Fetch package zips from remote sources.")
@@ -83,7 +83,7 @@ var parts = []
if (downloaded_count > 0) parts.push(`${text(downloaded_count)} downloaded`)
if (cached_count > 0) parts.push(`${text(cached_count)} cached`)
if (fail_count > 0) parts.push(`${text(fail_count)} failed`)
if (parts.length == 0) parts.push("nothing to fetch")
if (length(parts) == 0) parts.push("nothing to fetch")
log.console("Fetch complete: " + text(parts, ", "))
$stop()