Skip to content

Commit 1d80f9f

Browse files
committed
Make -Path optional in Path parameter set.
1 parent 9aaa644 commit 1d80f9f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

PSql.Deploy/Commands/GetSqlMigrationsCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public sealed class GetSqlMigrationsCommand : AsyncPSCmdlet
2323
/// </summary>
2424
[Parameter(
2525
ParameterSetName = "Path",
26-
Mandatory = true,
26+
Mandatory = false,
2727
Position = 0,
2828
ValueFromPipeline = true
2929
)]
@@ -71,7 +71,7 @@ private async Task ProcessRecordAsync()
7171
{
7272
var migrations = ParameterSetName switch
7373
{
74-
"Path" => GetMigrations(Path!),
74+
"Path" => GetMigrations(Path),
7575
_ => await GetMigrationsAsync(Target!),
7676
};
7777

@@ -84,7 +84,7 @@ private async Task ProcessRecordAsync()
8484
WriteObject(new Migration(migration));
8585
}
8686

87-
private IReadOnlyList<M.Migration> GetMigrations(string path)
87+
private IReadOnlyList<M.Migration> GetMigrations(string? path)
8888
{
8989
path = this.GetFullPath(path);
9090

0 commit comments

Comments
 (0)