Skip to content

Commit

Permalink
Address PR Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Trenly committed Jun 22, 2022
1 parent e11efae commit c332dee
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 13 deletions.
2 changes: 0 additions & 2 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ comparand
conemu
config
Configurability
conio
constexpr
contosa
contosainstaller
Expand Down Expand Up @@ -186,7 +185,6 @@ fstream
func
gcount
gdi
getch
getline
github
githubusercontent
Expand Down
2 changes: 1 addition & 1 deletion src/AppInstallerCLICore/Command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ namespace AppInstaller::CLI
}
if (context.Args.Contains(Execution::Args::Type::Wait))
{
context.Reporter.PromptForAnyKey(Resource::String::PressAnyKeyToContinue);
context.Reporter.PromptForEnter();
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/AppInstallerCLICore/Commands/RootCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ namespace AppInstaller::CLI

if (context.Args.Contains(Execution::Args::Type::Wait))
{
context.Reporter.PromptForAnyKey(Resource::String::PressAnyKeyToContinue);
context.Reporter.PromptForEnter();
}
}

Expand Down
7 changes: 3 additions & 4 deletions src/AppInstallerCLICore/ExecutionReporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Licensed under the MIT License.
#include "pch.h"
#include "ExecutionReporter.h"
#include <conio.h>


namespace AppInstaller::CLI::Execution
Expand Down Expand Up @@ -156,11 +155,11 @@ namespace AppInstaller::CLI::Execution
}
}

int Reporter::PromptForAnyKey(Resource::LocString message, Level level)
void Reporter::PromptForEnter(Level level)
{
auto out = GetOutputStream(level);
out << message << std::endl;
return _getch();
out << std::endl << Resource::String::PressEnterToContinue << std::endl;
m_in.get();
}

void Reporter::ShowIndefiniteProgress(bool running)
Expand Down
4 changes: 2 additions & 2 deletions src/AppInstallerCLICore/ExecutionReporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ namespace AppInstaller::CLI::Execution
// Prompts the user, return true if they consented.
bool PromptForBoolResponse(Resource::LocString message, Level level = Level::Info);

// Prompts the user, returns the key they pressed
int PromptForAnyKey(Resource::LocString message, Level level = Level::Info);
// Prompts the user, continues when Enter is pressed
void PromptForEnter(Level level = Level::Info);

// Used to show indefinite progress. Currently an indefinite spinner is the form of
// showing indefinite progress.
Expand Down
2 changes: 1 addition & 1 deletion src/AppInstallerCLICore/Resources.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ namespace AppInstaller::CLI::Resource
WINGET_DEFINE_RESOURCE_STRINGID(PortableRegistryCollisionOverridden);
WINGET_DEFINE_RESOURCE_STRINGID(PositionArgumentDescription);
WINGET_DEFINE_RESOURCE_STRINGID(PreserveArgumentDescription);
WINGET_DEFINE_RESOURCE_STRINGID(PressAnyKeyToContinue);
WINGET_DEFINE_RESOURCE_STRINGID(PressEnterToContinue);
WINGET_DEFINE_RESOURCE_STRINGID(PrivacyStatement);
WINGET_DEFINE_RESOURCE_STRINGID(ProductCodeArgumentDescription);
WINGET_DEFINE_RESOURCE_STRINGID(PromptOptionNo);
Expand Down
4 changes: 2 additions & 2 deletions src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw
Original file line number Diff line number Diff line change
Expand Up @@ -1284,8 +1284,8 @@ Please specify one of them using the `--source` option to proceed.</value>
<data name="PurgeArgumentDescription" xml:space="preserve">
<value>Deletes all files and directories in the package directory (portable)</value>
</data>
<data name="PressAnyKeyToContinue" xml:space="preserve">
<value>Press any key to continue . . .</value>
<data name="PressEnterToContinue" xml:space="preserve">
<value>Press Enter to continue . . .</value>
</data>
<data name="RenameArgumentDescription" xml:space="preserve">
<value>The value to rename the executable file (portable)</value>
Expand Down

0 comments on commit c332dee

Please sign in to comment.