From 16d4ecf5e980dc3c6fab0dc61fdb6c37e6546384 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Thu, 22 Aug 2024 21:17:49 +0100 Subject: [PATCH] advertise `undo` and `redo` when there are changes to an env --- src/Operations.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Operations.jl b/src/Operations.jl index 843fa7bc9c..67915c0bdc 100644 --- a/src/Operations.jl +++ b/src/Operations.jl @@ -2743,8 +2743,13 @@ function print_status(env::EnvCache, old_env::Union{Nothing,EnvCache}, registrie println(io) end + # figure out if we are at the end of status prints, given this is called twice for combined mode + last_status_report = mode != PKGMODE_COMBINED || mode == PKGMODE_COMBINED && manifest + if !no_changes && !all_packages_downloaded - printpkgstyle(io, :Info, "Packages marked with $not_installed_indicator are not downloaded, use `instantiate` to download", color=Base.info_color(), ignore_indent) + printpkgstyle(io, :Info, "Packages marked with $not_installed_indicator are not downloaded, use `instantiate` to download. Use `undo/redo` to revert changes.", color=Base.info_color(), ignore_indent) + elseif last_status_report && old_env !== nothing && !no_changes + printpkgstyle(io, :Info, "Use `undo/redo` to revert changes.", color=Base.info_color(), ignore_indent) end if !outdated && (mode != PKGMODE_COMBINED || (manifest == true)) tipend = manifest ? " -m" : ""