Skip to content

Commit 329e617

Browse files
[projmgr] Skip writing cbuild-pack when csolution is not correctly parsed (#1099) (#1902)
Co-authored-by: Daniel Brondani <[email protected]>
1 parent 83b3157 commit 329e617

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/projmgr/src/ProjMgrCbuildPack.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ ProjMgrCbuildPack::ProjMgrCbuildPack(YAML::Node node, const vector<ContextItem*>
138138
//-- ProjMgrYamlEmitter::GenerateCbuildPack -------------------------------------------------------
139139
bool ProjMgrYamlEmitter::GenerateCbuildPack(const vector<ContextItem*> contexts,
140140
bool keepExistingPackContent, bool cbuildPackFrozen) {
141+
if (m_parser->GetCsolution().name.empty()) {
142+
return false;
143+
}
141144
// generate cbuild-pack.yml
142145
const string& filename = m_parser->GetCsolution().directory + "/" + m_parser->GetCsolution().name + ".cbuild-pack.yml";
143146
YAML::Node rootNode;

0 commit comments

Comments
 (0)