switch to length fn
This commit is contained in:
4
fetch.ce
4
fetch.ce
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user