This allows env variables (in the form of a kv table) to be passed both to the command creation and the actual running of the command (the later takes precedence over any keys set in command).
Eg.
env_cmd = command "ruby", env: {SOMEKEY: "VALUE ONE"}
env_cmd "printenv.rb" -- would print SOMEKEY = VALUE ONE
env_cmd "printenv.rb", {SOMEKEY: "VALUE TWO"} -- would print SOMEKEY = VALUE TWO
This allows env variables (in the form of a kv table) to be passed both to the command creation and the actual running of the command (the later takes precedence over any keys set in command).
Eg.