the runtime enum indicating which runtime should be used for querying the environment variable.
the shell command to execute.
optional configuration to apply onto the shell child-process.
a promise that is resolved when the child process that executed the command has closed.
execute a shell/terminal command on system runtimes (i.e. RUNTIME.DENO, RUNTIME.BUN, or RUNTIME.NODE). otherwise an error gets thrown on all other environments, since they do not support shell command execution.
we don't use
Deno.Command
for deno here, because it does not default to your os's native preferred terminal, and instead you will need to provide one yourself (such as "bash", "cmd", "shell", etc...). which is why we usenode:child_process
for all three runtimes.Example