Skip to content

Commit 5c74e4f

Browse files
style: pre-commit.ci fixes
1 parent 8aae3ae commit 5c74e4f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

include/CLI/impl/App_inl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,8 +1061,8 @@ CLI11_INLINE void App::_process_env() {
10611061
}
10621062

10631063
for(App_p &sub : subcommands_) {
1064-
if (sub->get_name().empty() || !sub->parse_complete_callback_) {
1065-
if (sub->count_all() > 0) {
1064+
if(sub->get_name().empty() || !sub->parse_complete_callback_) {
1065+
if(sub->count_all() > 0) {
10661066
// only process environment variables if the callback has actually been triggered already
10671067
sub->_process_env();
10681068
}

tests/SubcommandTest.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,25 +2119,25 @@ TEST_CASE_METHOD(TApp, "DotNotationSubcommandRecusive2", "[subcom]") {
21192119
CHECK(extras.front() == "sub1.sub2.sub3.bob");
21202120
}
21212121

2122-
// Reported bug #903 on github
2122+
// Reported bug #903 on github
21232123
TEST_CASE_METHOD(TApp, "subcommandEnvironmentName", "[subcom]") {
21242124
auto *sub1 = app.add_subcommand("sub1");
21252125
std::string someFile;
21262126
int sub1value{0};
21272127
sub1->add_option("-f,--file", someFile)->envname("SOME_FILE")->required()->check(CLI::ExistingFile);
2128-
sub1->add_option("-v",sub1value);
2128+
sub1->add_option("-v", sub1value);
21292129
auto sub2 = app.add_subcommand("sub2");
21302130
int completelyUnrelatedToSub1 = 0;
21312131
sub2->add_option("-v,--value", completelyUnrelatedToSub1)->required();
21322132

2133-
args={"sub2","-v", "111"};
2133+
args = {"sub2", "-v", "111"};
21342134
CHECK_NOTHROW(run());
21352135

21362136
put_env("SOME_FILE", "notafile.txt");
21372137

21382138
CHECK_NOTHROW(run());
2139-
2140-
args={"sub1","-v", "111"};
2139+
2140+
args = {"sub1", "-v", "111"};
21412141
CHECK_THROWS_AS(run(), CLI::ValidationError);
21422142
unset_env("SOME_FILE");
21432143
}

0 commit comments

Comments
 (0)