Files
marqdo-std-system/modules/env.mq.md
cflmy 053ddb0e59 migrate: own clock/datetime/env/process/random sources and baseline assertions
Move the official stdlib system modules to their unique source authority without
changing public std: paths or host authorization. Carry the pre-migration product
assertions into component cases captured from the baseline Bundle; the process
case resolves the granted program and expected stdout from the verified CLI.

Refs cflmy/marqdo#9, cflmy/marqdo-std-system#1
2026-11-26 23:30:25 +08:00

484 B

@exec env

读取

params(名称)

读取一个显式授权的环境变量。名称是精确匹配,不支持 glob;未授权是 permission.denied,未设置是 env.not_found,非 UTF-8 是 env.not_unicode。

return resource.request("env.get", [名称])

存在

params(名称)

结果 = 读取(名称)

if 结果.ok

return {ok: true, value: true}

else if 结果.code == "env.not_found"

return {ok: true, value: false}

end end return 结果