Skip to content

Commit

Permalink
Feat: Wait upon command completion
Browse files Browse the repository at this point in the history
  • Loading branch information
Trenly committed Jun 10, 2022
1 parent 9d34634 commit c5e9dc8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/AppInstallerCLICore/Argument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ namespace AppInstaller::CLI
void Argument::GetCommon(std::vector<Argument>& args)
{
args.push_back(ForType(Args::Type::Help));
args.push_back(ForType(Args::Type::Wait));
args.push_back(ForType(Args::Type::NoVT));
args.push_back(ForType(Args::Type::RainbowStyle));
args.push_back(ForType(Args::Type::RetroStyle));
Expand Down
4 changes: 4 additions & 0 deletions src/AppInstallerCLICore/Command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,10 @@ namespace AppInstaller::CLI
{
ExecuteInternal(context);
}
if (context.Args.Contains(Execution::Args::Type::Wait))
{
system("pause");
}
}

void Command::ValidateArgumentsInternal(Execution::Args&) const
Expand Down
7 changes: 6 additions & 1 deletion src/AppInstallerCLICore/Commands/RootCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ namespace AppInstaller::CLI
{
ExecuteInternal(context);
}

if (context.Args.Contains(Execution::Args::Type::Wait))
{
system("pause");
}
}

void RootCommand::ExecuteInternal(Execution::Context& context) const
Expand Down Expand Up @@ -198,7 +203,7 @@ namespace AppInstaller::CLI
}
else if (context.Args.Contains(Execution::Args::Type::ListVersions))
{
context.Reporter.Info() << 'v' << Runtime::GetClientVersion();
context.Reporter.Info() << 'v' << Runtime::GetClientVersion() << std::endl;
}
else
{
Expand Down

0 comments on commit c5e9dc8

Please sign in to comment.