Skip to content

Commit aa72d20

Browse files
committed
Support json5 in overrides file.
1 parent 5ac25f6 commit aa72d20

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/exec/extension/default.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { BasicCredentialHandler } from "azure-devops-node-api/handlers/basiccred
55
import { GalleryBase, CoreExtInfo, PublisherManager, PackagePublisher } from "./_lib/publish";
66
import * as path from "path";
77
import _ = require("lodash");
8+
import jju = require("jju");
89
import args = require("../../lib/arguments");
910
import https = require("https");
1011
import trace = require("../../lib/trace");
@@ -213,7 +214,7 @@ export class ExtensionBase<T> extends TfCommand<ExtensionArguments, T> {
213214
let mergedOverrides = {};
214215
let contentJSON = {};
215216
try {
216-
contentJSON = JSON.parse(content);
217+
contentJSON = json5 ? jju.parse(content) : JSON.parse(content);
217218
} catch (e) {
218219
throw new Error("Could not parse contents of " + overridesFile[0] + " as JSON. \n");
219220
}

0 commit comments

Comments
 (0)