intrinsics rewritten without ++, --, etc
This commit is contained in:
12
package.cm
12
package.cm
@@ -51,7 +51,7 @@ package.load_config = function(name)
|
||||
return config_cache[config_path]
|
||||
|
||||
if (!fd.is_file(config_path)) {
|
||||
throw Error(`${config_path} does not exist`)
|
||||
print(`${config_path} does not exist`); disrupt
|
||||
}
|
||||
|
||||
var content = text(fd.slurp(config_path))
|
||||
@@ -158,7 +158,7 @@ package.split_alias = function(name, path)
|
||||
var parts = array(path, '/')
|
||||
var first_part = parts[0]
|
||||
|
||||
try {
|
||||
var _split = function() {
|
||||
var config = package.load_config(name)
|
||||
if (!config) return null
|
||||
|
||||
@@ -168,11 +168,11 @@ package.split_alias = function(name, path)
|
||||
var remaining_path = text(array(parts, 1), '/')
|
||||
return { package: dep_locator, path: remaining_path }
|
||||
}
|
||||
} catch (e) {
|
||||
// Config doesn't exist or couldn't be loaded
|
||||
return null
|
||||
} disruption {
|
||||
return null
|
||||
}
|
||||
|
||||
return null
|
||||
return _split()
|
||||
}
|
||||
|
||||
package.gather_dependencies = function(name)
|
||||
|
||||
Reference in New Issue
Block a user