Skip to content

Commit

Permalink
VCI-905: Add FileExists statement if PackageManifestPath is not defau…
Browse files Browse the repository at this point in the history
…lt (#145)
  • Loading branch information
krankenbro authored Aug 21, 2024
1 parent e0099aa commit 5cab7a1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/VirtoCommerce.Build/PlatformTools/Build.PackageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,22 @@ internal partial class Build
[Parameter("Platform or Module version to install", Name = "Version")]
public static string VersionToInstall { get; set; }

private const string _packageManifestPathDefaultValue = "./vc-package.json";
private static string _packageManifestPath = _packageManifestPathDefaultValue;

[Parameter("vc-package.json path")]
public static string PackageManifestPath { get; set; } = "./vc-package.json";
public static string PackageManifestPath
{
get {
if (_packageManifestPath != _packageManifestPathDefaultValue)
{
Assert.FileExists(_packageManifestPath.ToAbsolutePath());
}
return _packageManifestPath;
}

set => _packageManifestPath = value;
}

[Parameter("Install params (install -module VirtoCommerce.Core:1.2.3)")]
public static string[] Module { get; set; }
Expand Down

0 comments on commit 5cab7a1

Please sign in to comment.