Merge pull request #389 from brunoprietog/include-role-options-when-executing-commands

Include role options when executing commands
This commit is contained in:
David Heinemeier Hansson
2023-07-26 14:04:28 +02:00
committed by GitHub
2 changed files with 16 additions and 0 deletions

View File

@@ -76,11 +76,14 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
end
def execute_in_new_container(*command, interactive: false)
role = config.role(self.role)
docker :run,
("-it" if interactive),
"--rm",
*config.env_args,
*config.volume_args,
*role&.option_args,
config.absolute_image,
*command
end