Skip to content

Commit eebc00f

Browse files
committed
Format versions more simply in json output of nbgv get-version
1 parent 166568d commit eebc00f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/nbgv/Program.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,11 @@ private static ExitCodes OnGetVersionCommand(string projectPath, string format,
264264
Console.WriteLine("NPM package Version: {0}", oracle.NpmPackageVersion);
265265
break;
266266
case "json":
267-
Console.WriteLine(JsonConvert.SerializeObject(oracle, Formatting.Indented));
267+
var converters = new JsonConverter[]
268+
{
269+
new Newtonsoft.Json.Converters.VersionConverter(),
270+
};
271+
Console.WriteLine(JsonConvert.SerializeObject(oracle, Formatting.Indented, converters));
268272
break;
269273
default:
270274
Console.Error.WriteLine("Unsupported format: {0}", format);

0 commit comments

Comments
 (0)