scryer-prolog
scryer-prolog copied to clipboard
getenv/2 doesn't enumerate all environment variables
As in the title, getenv/2
doesn't enumerate all environment variables:
?- use_module(library(os)).
true.
?- getenv(K, V).
error(instantiation_error,must_be/2).
This reduces usefulness of said predicate. The possible workaround is to use system's printenv (1)
program and parse it's output, but it is ugly and platform-dependent.