Well my bad, it works fine.  I was thinking the plugins were disabled if 
they were subdued in color.  No, that just means they can't be disabled.  I 
didn't have any disabled.  I disabled subversion and it shows Disabled.  
Maybe this will help someone down the road, though, who wants to do the 
same.

On Friday, April 15, 2022 at 10:19:10 AM UTC-6 [email protected] wrote:

> Hi all!  I'm trying to display a few simple things from the console for 
> our security team.  I'm getting the correct answers for all except whether 
> the plugin is enabled or not.  They are all returning enabled for me.  Can 
> someone tell me what I'm doing wrong in my groovy code?
>
> Jenkins.instance.pluginManager.plugins.each{
>   plugin -> 
>   boolean active = ( plugin.isActive() )
>   String enabled = ( active == true ? "Enabled" : "Disabled"  )
>   println ("${plugin.getDisplayName()} (${plugin.getShortName()}): 
> ${plugin.getVersion()} ${enabled}")
> }
>
> Thanks,
> Eric
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4ede952c-7702-405c-b97f-c4db34cb24f4n%40googlegroups.com.

Reply via email to