FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cli/src/build/BuildTaskProcessExecutor.cpp at main · vixcpp/cli · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
vixcpp
/
cli
Public
Notifications
You must be signed in to change notification settings
Fork
2
Star
10
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cli
/
src
/
build
/
BuildTaskProcessExecutor.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
57 lines (47 loc) · 1.4 KB
Breadcrumbs
cli
/
src
/
build
/
BuildTaskProcessExecutor.cpp
Copy path
File metadata and controls
57 lines (47 loc) · 1.4 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
*
*
* @file BuildTaskProcessExecutor.cpp
* @author Gaspard Kirira
*
* Copyright 2026, Gaspard Kirira. All rights reserved.
* https://github.com/vixcpp/vix
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* Vix.cpp
*
* CLI process executor for build tasks
*
*/
#
include
<
vix/cli/build/BuildTaskProcessExecutor.hpp
>
#
include
<
vix/engine/Process.hpp
>
namespace
vix
::cli::build
{
BuildTaskResult
execute_build_task_process
(BuildTask &task)
{
BuildTaskResult result;
result.
taskId
= task.
id
;
if
(task.
command
.
empty
())
{
result.
state
= BuildTaskState::Failed;
result.
exitCode
=
127
;
result.
output
=
"
Empty build command for task:
"
+ task.
id
+
"
\n
"
;
return
result;
}
vix::engine::process::Command command;
command.
argv
= task.
command
;
command.
workingDirectory
= task.
workingDirectory
;
command.
mergeStdErr
=
true
;
const
vix::engine::process::Result processResult =
vix::engine::process::execute
(command);
result.
exitCode
= processResult.
exitCode
;
result.
output
= processResult.
output
;
if
(!processResult.
errorMessage
.
empty
())
result.
output
+= processResult.
errorMessage
+
"
\n
"
;
if
(processResult.
success
())
result.
state
= BuildTaskState::Done;
else
result.
state
= BuildTaskState::Failed;
return
result;
}
}
//
namespace vix::cli::build
Back
|
FazBrowse Home
|
New Git URL