Skip to content

Commit dbd3cd8

Browse files
committed
Don't clobber existing version with default
1 parent 7b54743 commit dbd3cd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nbgv/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ private static int OnInstallCommand(string path, string version, IReadOnlyList<s
299299
var existingOptions = context.VersionFile.GetVersion();
300300
if (existingOptions is not null)
301301
{
302-
if (!string.IsNullOrEmpty(version))
302+
if (!string.IsNullOrEmpty(version) && version != DefaultVersionSpec)
303303
{
304304
var setVersionExitCode = OnSetVersionCommand(path, version);
305305
if (setVersionExitCode != (int)ExitCodes.OK)

0 commit comments

Comments
 (0)