diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt index 5372c2f6780..359d1793bdd 100644 --- a/.github/actions/spelling/allow.txt +++ b/.github/actions/spelling/allow.txt @@ -73,7 +73,6 @@ comparand conemu config Configurability -conio constexpr contosa contosainstaller @@ -186,7 +185,6 @@ fstream func gcount gdi -getch getline github githubusercontent diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt index b97cb09fcf6..e5d6ff1fd90 100644 --- a/.github/actions/spelling/excludes.txt +++ b/.github/actions/spelling/excludes.txt @@ -16,6 +16,7 @@ ignore$ \.mod$ \.mp[34]$ \.msix$ +\.msixbundle$ \.png$ \.vcxitems$ \.vcxproj$ diff --git a/src/AppInstallerCLICore/Command.cpp b/src/AppInstallerCLICore/Command.cpp index e8a36ae12b7..c0944b974fd 100644 --- a/src/AppInstallerCLICore/Command.cpp +++ b/src/AppInstallerCLICore/Command.cpp @@ -820,7 +820,7 @@ namespace AppInstaller::CLI } if (context.Args.Contains(Execution::Args::Type::Wait)) { - context.Reporter.PromptForAnyKey(Resource::String::PressAnyKeyToContinue); + context.Reporter.PromptForEnter(); } } diff --git a/src/AppInstallerCLICore/Commands/RootCommand.cpp b/src/AppInstallerCLICore/Commands/RootCommand.cpp index 86290a78576..e5b19ab15c8 100644 --- a/src/AppInstallerCLICore/Commands/RootCommand.cpp +++ b/src/AppInstallerCLICore/Commands/RootCommand.cpp @@ -163,7 +163,7 @@ namespace AppInstaller::CLI if (context.Args.Contains(Execution::Args::Type::Wait)) { - context.Reporter.PromptForAnyKey(Resource::String::PressAnyKeyToContinue); + context.Reporter.PromptForEnter(); } } diff --git a/src/AppInstallerCLICore/ExecutionReporter.cpp b/src/AppInstallerCLICore/ExecutionReporter.cpp index 90165c4c35a..b4972958d85 100644 --- a/src/AppInstallerCLICore/ExecutionReporter.cpp +++ b/src/AppInstallerCLICore/ExecutionReporter.cpp @@ -2,7 +2,6 @@ // Licensed under the MIT License. #include "pch.h" #include "ExecutionReporter.h" -#include namespace AppInstaller::CLI::Execution @@ -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) diff --git a/src/AppInstallerCLICore/ExecutionReporter.h b/src/AppInstallerCLICore/ExecutionReporter.h index 0f09587170a..e262f44a6a7 100644 --- a/src/AppInstallerCLICore/ExecutionReporter.h +++ b/src/AppInstallerCLICore/ExecutionReporter.h @@ -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. diff --git a/src/AppInstallerCLICore/Resources.h b/src/AppInstallerCLICore/Resources.h index 9536f615aa5..a0a0ac79063 100644 --- a/src/AppInstallerCLICore/Resources.h +++ b/src/AppInstallerCLICore/Resources.h @@ -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); diff --git a/src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw b/src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw index 72f9d75680e..c8ed61dcf34 100644 --- a/src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw +++ b/src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw @@ -1281,8 +1281,8 @@ Please specify one of them using the `--source` option to proceed. Deletes all files and directories in the package directory (portable) - - Press any key to continue . . . + + Press Enter to continue . . . The value to rename the executable file (portable)