From 98b634e2b77fa6894a13d5917128db0460450288 Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Sat, 5 Dec 2020 01:06:44 +0000 Subject: [PATCH] April Fools' Day prank for macOS --- Cmdline/Action/Prompt.cs | 13 +++++++++++++ macosx/CKAN | 8 +++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Cmdline/Action/Prompt.cs b/Cmdline/Action/Prompt.cs index 336fcc7f12..02edecab49 100644 --- a/Cmdline/Action/Prompt.cs +++ b/Cmdline/Action/Prompt.cs @@ -13,6 +13,19 @@ public Prompt() { } public int RunCommand(KSPManager manager, object raw_options) { CommonOptions opts = raw_options as CommonOptions; + // Print an intro if not in headless mode + if (!(opts?.Headless ?? false)) + { + Console.WriteLine("Welcome to CKAN!"); + Console.WriteLine(""); + if (DateTime.Now.Month == 4 && DateTime.Now.Day == 1) + { + Console.WriteLine("Happy April Fools' Day! You may want to try the consoleui command."); + Console.WriteLine(""); + } + Console.WriteLine("To get help, type help and press enter."); + Console.WriteLine(""); + } bool done = false; while (!done) { diff --git a/macosx/CKAN b/macosx/CKAN index 24c032a813..99a7bdca09 100755 --- a/macosx/CKAN +++ b/macosx/CKAN @@ -67,9 +67,15 @@ else # Default to consoleui on Catalina and later if they double click if ! supports_32_bit && [[ "$@" == "" ]] then + COMMAND=consoleui + if [[ $(date +'%m%d') == 0401 ]] + then + # Prank Mac users on April 1 + COMMAND=prompt + fi osascript <