Module | Dotenv::Substitutions::Command |
In: |
lib/dotenv/substitutions/command.rb
|
Substitute shell commands in a value.
SHA=$(git rev-parse HEAD)
INTERPOLATED_SHELL_COMMAND | = | / (?<backslash>\\)? # is it escaped with a backslash? \$ # literal $ (?<cmd> # collect command content for eval \( # require opening paren ([^()]|\g<cmd>)+ # allow any number of non-parens, or balanced # parens (by nesting the <cmd> expression # recursively) \) # require closing paren ) /x |