How to get the manifest version?

I’m moving Manifest files from Julia 1.6 to 1.7 and calling Pkg.upgrade_manifest() to do this.

Unfortunately, if a manifest is already at version 2.0, then Pkg.upgrade_manifest() throws an exception:

ERROR: LoadError: Format of manifest file at `Modules-1.0/Manifest.toml` already up to date: manifest_format == 2.0.0
 [1] pkgerror(msg::String)
   @ Pkg.Types /julia-1.7.2/share/julia/stdlib/v1.7/Pkg/src/Types.jl:68
 [2] upgrade_manifest(ctx::Pkg.Types.Context)
   @ Pkg.API /julia-1.7.2/share/julia/stdlib/v1.7/Pkg/src/API.jl:1689
 [3] upgrade_manifest()
   @ Pkg.API /julia-1.7.2/share/julia/stdlib/v1.7/Pkg/src/API.jl:1687

Can we either change this to display a warning and continue, or alternately, is there a way for me to determine the version of the manifest and just skip calling upgrade_manifest if it is the right version?