From d48d331e81745f1dfeb0835a7f9f37806d1655b8 Mon Sep 17 00:00:00 2001 From: Braydon Kains Date: Mon, 11 May 2020 23:18:12 -0400 Subject: [PATCH] Putting the exit where it belongs --- main.cr | 2 ++ spec/ltnp/ltnp_operator_spec.cr | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/main.cr b/main.cr index af3590a..1f82451 100644 --- a/main.cr +++ b/main.cr @@ -37,6 +37,8 @@ OptionParser.parse do |parser| else puts "No process found by the name %s" % p_name end + + exit end parser.on "-k PORT", "--kill-port=PORT", "Kill process on port" do |port| diff --git a/spec/ltnp/ltnp_operator_spec.cr b/spec/ltnp/ltnp_operator_spec.cr index 281ef10..f641041 100644 --- a/spec/ltnp/ltnp_operator_spec.cr +++ b/spec/ltnp/ltnp_operator_spec.cr @@ -26,7 +26,7 @@ describe LtnpOperator do end it "should not find record when process doesn't exist" do - sut.search_p_name(existing_p_name).nil?.should be_false + sut.search_p_name(nonsense_p_name).nil?.should be_true end end end