Skip to content

Commit

Permalink
Add validation to avoid saving snippet without a command line
Browse files Browse the repository at this point in the history
  • Loading branch information
e82eric committed Jun 4, 2024
1 parent f5ceac9 commit d6873c1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cascadia/TerminalApp/AppActionHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,12 @@ namespace winrt::TerminalApp::implementation
}
}

if (realArgs.Commandline().empty())
{
ActionSaveFailed(L"CommandLine is Required");
return;
}

try
{
winrt::Microsoft::Terminal::Control::KeyChord keyChord = nullptr;
Expand Down

0 comments on commit d6873c1

Please sign in to comment.