Skip to content

Absolute Paths for Templates? #360

Closed

Description

@DevOpsBoondoggles

Not sure if I'm being stupid here but can I not use an absolute path for a template ?
e.g.

<file destination='src/${PLASTER_PARAM_ModuleName}.psm1' source='${PLASTER_PARAM_TemplatesFolderPath}\template.psm1' />

where ${PLASTER_PARAM_TemplatesFolderPath} goes to \Server\fileshare\

The error:
"template.psm1' specified in the file directive in the template manifest cannot be an absolute path.
Change the path to a relative path."

Which seems really strange. My use case is that I am sharing a module that creates other modules for a company, and I want to reference a shared template in the area.

I'm going to work around by copying it local but wasn't sure if it was just a bad error message and I'm missing something obvious. I did look around but I didn't see anything related, though I could just be being dumb.

Activity

  1. rkeithhill commented on Apr 21, 2020

    @rkeithhill
    Collaborator

    This is limitation that we might be able to lift. The intent is to prevent a Plaster template from modifying a directory other than the dir that you're applying the template too. However, copy file from another location into the template source dir seems like that might be a safe thing to do.

  2. DevOpsBoondoggles commented on Apr 26, 2020

    @DevOpsBoondoggles
    Author

    I am probably too rubbish at Powershell to assist with this but happy to try if someone could point me where to look

  3. 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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions