Skip to content

Commit 082c8e2

Browse files
[projmgr] Skip writing cbuild-run in case of configuration errors
1 parent f00270f commit 082c8e2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tools/projmgr/include/ProjMgr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class ProjMgr {
181181
bool ValidateCreatedFor(const std::string& createdFor);
182182

183183
bool Configure();
184-
bool GenerateYMLConfigurationFiles();
184+
bool GenerateYMLConfigurationFiles(bool previousResult);
185185
bool UpdateRte();
186186
bool ParseAndValidateContexts();
187187
};

tools/projmgr/src/ProjMgr.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ bool ProjMgr::PopulateContexts(void) {
507507
return true;
508508
}
509509

510-
bool ProjMgr::GenerateYMLConfigurationFiles() {
510+
bool ProjMgr::GenerateYMLConfigurationFiles(bool previousResult) {
511511
// Generate cbuild pack file
512512
const bool isUsingContexts = m_contextSet || m_context.size() != 0;
513513
if (!m_emitter.GenerateCbuildPack(m_processedContexts, isUsingContexts, m_frozenPacks)) {
@@ -525,7 +525,7 @@ bool ProjMgr::GenerateYMLConfigurationFiles() {
525525
}
526526

527527
// Generate cbuild-run file
528-
if (m_contextSet && !m_processedContexts.empty()) {
528+
if (previousResult && m_contextSet && !m_processedContexts.empty()) {
529529
if (!m_runDebug.CollectSettings(m_processedContexts)) {
530530
result = false;
531531
}
@@ -684,7 +684,7 @@ bool ProjMgr::RunConvert(void) {
684684
bool Success = Configure();
685685

686686
// Generate YML build configuration files
687-
Success &= GenerateYMLConfigurationFiles();
687+
Success &= GenerateYMLConfigurationFiles(Success);
688688

689689
// Generate Cprjs
690690
if (m_cbuildgen) {

0 commit comments

Comments
 (0)