Skip to content

Commit 467f916

Browse files
committed
move try block
1 parent 4fd7706 commit 467f916

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Tasks/JsonPatch/jsonPatch.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ import jsonPatcher = require('./common/jsonPatcher');
55
import json5Patcher = require('./json5Patcher');
66
import { Operation } from 'fast-json-patch';
77

8-
var targetPath = tl.getPathInput('JsonWorkingDir', true);
9-
var patchContent = tl.getInput('JsonPatchContent', true);
8+
try {
9+
var targetPath = tl.getPathInput('JsonWorkingDir', true);
10+
var patchContent = tl.getInput('JsonPatchContent', true);
1011

11-
var patterns: any = tl.getInput('JsonTargetFilters', true);
12-
var outputPatchedFile = tl.getBoolInput('OutputPatchFile', true);
13-
var failIfNoPatchApplied = tl.getBoolInput('FailIfNoPatchApplied', true);
14-
var treatErrors = tl.getInput('TreatErrors', true);
15-
var syntax = tl.getInput('SyntaxType', true);
16-
var useJson5 = tl.getBoolInput('UseJson5', true);
17-
var produceJson5 = tl.getBoolInput('ProduceJson5', true);
12+
var patterns: any = tl.getInput('JsonTargetFilters', true);
13+
var outputPatchedFile = tl.getBoolInput('OutputPatchFile', true);
14+
var failIfNoPatchApplied = tl.getBoolInput('FailIfNoPatchApplied', true);
15+
var treatErrors = tl.getInput('TreatErrors', true);
16+
var syntax = tl.getInput('SyntaxType', true);
17+
var useJson5 = tl.getBoolInput('UseJson5', true);
18+
var produceJson5 = tl.getBoolInput('ProduceJson5', true);
1819

19-
try {
2020
var patches: Operation[] =
2121
syntax == 'slick'
2222
? patchProcess.expandVariablesAndParseSlickPatch(patchContent)

0 commit comments

Comments
 (0)