The previous behavior meant getting the clipboard would first empty it if STDIN was null or empty which can easily happen when run non-interactively. Fixes #6302