mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
CI/CircleCI: Expose binaries built on Circle CI as docker images in the Circle CI artifacts (#25832)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
(cherry picked from commit 9af6bf15aa)
This commit is contained in:
@@ -84,17 +84,24 @@ static int CreateChildProcess(T waiter, std::string const& executable,
|
||||
executable.c_str(), boost::algorithm::join(argsVector, " ").c_str());
|
||||
}
|
||||
|
||||
// prepare file with only read permission (boost process opens with read_write)
|
||||
std::shared_ptr<FILE> inputFile(!input.empty() ? fopen(input.c_str(), "rb") : nullptr, [](FILE* ptr)
|
||||
{
|
||||
if (ptr != nullptr)
|
||||
fclose(ptr);
|
||||
});
|
||||
|
||||
// Start the child process
|
||||
child c = [&]()
|
||||
{
|
||||
if (!input.empty())
|
||||
if (inputFile)
|
||||
{
|
||||
// With binding stdin
|
||||
return child{
|
||||
exe = boost::filesystem::absolute(executable).string(),
|
||||
args = argsVector,
|
||||
env = environment(boost::this_process::environment()),
|
||||
std_in = input,
|
||||
std_in = inputFile.get(),
|
||||
std_out = outStream,
|
||||
std_err = errStream
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user