Skip to content

Directive confirm that pre-requisites is installed on the box. #269

Closed

Description

@larssb

This is a follow up to comments in #5 from 170623.

Useful if the project being generated with Plaster is a NodeJS project, uses TypeScript or something down that lane. In such cases it wold be great to be able to control that the user has NodeJS installed and so forth.

Thank you.

Activity

  1. rkeithhill commented on Jul 2, 2017

    @rkeithhill
    Collaborator

    How about I add a new built-in variable called $PLASTER_AvailableCommands that I scoop up with Get-Command -CommandType All. You can then use it like so

    <file condition='$PLASTER_AvailableCommands.Where({$_.Name -eq "node.exe" -and $_.CommandType -eq "Application"}).Version.Major -ge 6' ...
  2. larssb commented on Jul 2, 2017

    @larssb
    Author

    A totally legit idea.

    On MacOS v6 beta3 of PowerShell core I don't get a version number in the output. See the attached picture. I have no idea why, unfortunately. Tried with a different set of executables. Same result.
    Checked for a newer version of powershell for linux/mac. There is none per 170702.

    screen shot 2017-07-02 at 11 08 11

    The command I ran was Get-command -Name git -CommandType All

  3. rkeithhill commented on Jul 2, 2017

    @rkeithhill
    Collaborator

    Accessing the version info will only be valid on Windows as Windows binaries support encoding the version number as a resource in the binary. Either ELF binaries don't do support this or PS / .NET Core don't support reading the version info yet. I suspect the former.

  4. larssb commented on Jul 2, 2017

    @larssb
    Author

    @rkeithhill dang, that explains it. Hmm, maybe @daviwil knows a thing or two about this on MacOS, if I may be so free to pull you into the conversation here :-). There must be some other way on Linux/MacOS

    Thank you.

  5. larssb commented on Aug 17, 2017

    @larssb
    Author

    Any update on this issue?

  6. locked and limited conversation to collaborators on Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions