[forge-dev] FSH and testing for installation of a plugin

Jason Porter lightguard.jp at gmail.com
Wed May 9 08:54:54 EDT 2012


I want to install the plugin if it's not available.

On Wed, May 9, 2012 at 5:39 AM, Lincoln Baxter, III <lincolnbaxter at gmail.com
> wrote:

> Hmm... you want to make sure that a plugin is installed in a FSH script.
> Good question...
>
> Do you need the plugin to be available, or just installed (and possible
> not available in the current context.) In reality, you probably really want
> to check for the availability of the command, yes?
>
> I know that the shell throws errors on failure, but I'm not sure there's
> really a good way to test for that in a FSH script without using a
> try-catch block somehow. (Try catch would probably work, though I'm not
> exactly sure what the syntax would look like (it depends on your script to
> some extent.))
>
> ~Lincoln
>
> On Mon, May 7, 2012 at 3:27 PM, Jason Porter <lightguard.jp at gmail.com>wrote:
>
>> Any idea how this could be done? I could do a forge list-plugins --all
>> and iterate over that list (I think), but there should be a better way. Any
>> suggestions?
>>
>> --
>> Jason Porter
>> http://lightguard-jp.blogspot.com
>> http://twitter.com/lightguardjp
>>
>> Software Engineer
>> Open Source Advocate
>> Author of Seam Catch - Next Generation Java Exception Handling
>>
>> PGP key id: 926CCFF5
>> PGP key available at: keyserver.net, pgp.mit.edu
>>
>> _______________________________________________
>> forge-dev mailing list
>> forge-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>
>>
>
>
> --
> Lincoln Baxter, III
> http://ocpsoft.org
> "Simpler is better."
>
> _______________________________________________
> forge-dev mailing list
> forge-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/forge-dev
>
>


-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20120509/76fc16c6/attachment-0001.html 


More information about the forge-dev mailing list