working link

This commit is contained in:
2026-02-21 02:18:42 -06:00
parent ede033f52e
commit 20c2576fa7
3 changed files with 76 additions and 33 deletions

13
link.ce
View File

@@ -140,17 +140,18 @@ if (cmd == 'list') {
return
}
// Read package name from cell.toml
// Derive canonical package name from the target directory
_read_toml = function() {
content = toml.decode(text(fd.slurp(toml_path)))
if (content.package) {
pkg_name = content.package
var info = shop.file_info(target + '/cell.toml')
if (info && info.package) {
pkg_name = info.package
} else {
log.console("Error: cell.toml at " + target + " does not define 'package'")
log.console("Error: could not determine package name for " + target)
log.console("Ensure it is installed or has a git remote matching a lock entry")
$stop()
}
} disruption {
log.console("Error reading cell.toml")
log.console("Error determining package name for " + target)
$stop()
}
_read_toml()