Skip to content

Commit 58b1d87

Browse files
DilumAluthgestaticfloat
authored andcommitted
Don't show the @info message if we don't think sudo will prompt for a password
1 parent 1012595 commit 58b1d87

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/binfmt_misc.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ function register_requested_formats!(formats::Vector{BinFmtRegistration}; verbos
246246
msg = "Registering $(length(formats_to_register)) binfmt_misc entries, this may ask for your `sudo` password."
247247
if verbose
248248
@info(msg, formats=format_names)
249+
elseif (Sys.which("sudo") !== nothing) && (success(`sudo -k -n true`))
250+
# in this case, we know that `sudo` will not prompt the user for a password
249251
else
250252
@info(msg)
251253
end

0 commit comments

Comments
 (0)