diff --git a/spec/std/system_spec.cr b/spec/std/system_spec.cr
index f0969bb60944..9a64926d6e2f 100644
--- a/spec/std/system_spec.cr
+++ b/spec/std/system_spec.cr
@@ -5,7 +5,8 @@ describe System do
   describe "hostname" do
     pending_win32 "returns current hostname" do
       shell_hostname = `hostname`.strip
-      $?.success?.should be_true # The hostname command has to be available
+      pending! "`hostname` command was unsuccessful" unless $?.success?
+
       hostname = System.hostname
       hostname.should eq(shell_hostname)
     end