Skip to content

Commit 3cf2141

Browse files
committed
Ensure repository.xml file is created before referencing it in Dynamic parameter set up
1 parent 3399c73 commit 3cf2141

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/code/PublishPSResource.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ public PSCredential ProxyCredential {
122122
#region DynamicParameters
123123
public object GetDynamicParameters()
124124
{
125+
// Create a respository story (the PSResourceRepository.xml file) if it does not already exist (i.e on a new machine without PSGet)
126+
RepositorySettings.CheckRepositoryStore();
127+
125128
PSRepositoryInfo repository = RepositorySettings.Read(new[] { Repository }, out string[] _).FirstOrDefault();
126129
if (repository is not null && repository.ApiVersion == PSRepositoryInfo.APIVersion.ContainerRegistry)
127130
{

0 commit comments

Comments
 (0)