Skip to content

$env:Path not refreshed from prior actions? #57

Closed
@bdruth

Description

@bdruth

I have a fairly simple manifest using chocolatey/chocolatey and puppetlabs/powershell - when I install a component that updates the Machine Path (i.e. [System.Environment]::GetEnvironmentVariable("Path","Machine")), and subsequently issue an Exec which depends on that, it fails because Powershell doesn't see the updated Path.

I've tried setting path => $::path, path => $([System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")) and various other permutations to try to force an up-to-date Path being used, to no avail.

Any magic to make this work? Thanks!

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