Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

April Fools' Day prank for macOS #3224

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Cmdline/Action/Prompt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
8 changes: 7 additions & 1 deletion macosx/CKAN
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<END
tell application "Terminal"
do script "cd \"`pwd`\"; \"$MONO\" \"$ASSEMBLY\" consoleui"
do script "cd \"`pwd`\"; \"$MONO\" \"$ASSEMBLY\" $COMMAND"
end tell
END
else
Expand Down