PowerShell / PSArm

PSArm is a PowerShell module that provides a PowerShell-embedded domain-specific language (DSL) for Azure Resource Manager (ARM) templates
MIT License
78 stars 19 forks source link

ConvertFrom-ArmTemplate doesn't work with relative paths #134

Open bjompen opened 3 years ago

bjompen commented 3 years ago

When running `ConvertFrom-ArmTemplate -Path .\MyTemplate.json' an error is thrown as the CmdLet looks for the template in the wrong folder. Using full path works as expected.

image

rjmholt commented 3 years ago

I'm having trouble reproducing this:

image

alexandair commented 3 years ago

@rjmholt Is your template.json in the home directory?

rjmholt commented 3 years ago

No, standard directory:

image

rjmholt commented 3 years ago

Can you try with the attached?

PSArm.zip

rjmholt commented 3 years ago

@bjompen what PowerShell version are you running?

bjompen commented 3 years ago

Can you try with the attached?

PSArm.zip

This works.

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.1.3
PSEdition                      Core
GitCommitId                    7.1.3
OS                             Microsoft Windows 10.0.19042
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
rjmholt commented 3 years ago

PSVersion 7.1.3

Oh, interesting! I wonder if .NET made some changes under the hood. In any case, the linked PR should fix it.

kilasuit commented 3 years ago

@bjompen please provide some details of your environment set up which at minimum should include the output of $PSVersionTable & what version of PSArm you are using