Skip to content

Commit bcbe9d9

Browse files
author
Denis Nikulin (Akvelon Inc)
committed
Fixed the conditional compilation for the new build config.
1 parent 4567311 commit bcbe9d9

File tree

2 files changed

+8
-1
lines changed
  • Tasks/PythonScriptV0
  • _generated/PythonScriptV0_IssueSourceEnabled

2 files changed

+8
-1
lines changed

Tasks/PythonScriptV0/main.ts

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { pythonScript } from './pythonscript';
55
(async () => {
66
#if NODE20
77
let error: any | undefined;
8+
#elseif ISSUESOURCEENABLED //Duplicatation since the build config also based on NODE 20 and the task generator doesn't support multiple parameters
9+
let error: any | undefined;
810
#endif
911
try {
1012
task.setResourcePath(path.join(__dirname, 'task.json'));
@@ -22,6 +24,9 @@ import { pythonScript } from './pythonscript';
2224
#if NODE20
2325
error = e;
2426
task.setResult(task.TaskResult.Failed, error.message);
27+
#elseif ISSUESOURCEENABLED
28+
error = e;
29+
task.setResult(task.TaskResult.Failed, error.message);
2530
#else
2631
task.setResult(task.TaskResult.Failed, e.message);
2732
#endif

_generated/PythonScriptV0_IssueSourceEnabled/main.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as task from 'azure-pipelines-task-lib/task';
33
import { pythonScript } from './pythonscript';
44

55
(async () => {
6+
let error: any | undefined;
67
try {
78
task.setResourcePath(path.join(__dirname, 'task.json'));
89
await pythonScript({
@@ -16,6 +17,7 @@ import { pythonScript } from './pythonscript';
1617
});
1718
task.setResult(task.TaskResult.Succeeded, "");
1819
} catch (e) {
19-
task.setResult(task.TaskResult.Failed, e.message);
20+
error = e;
21+
task.setResult(task.TaskResult.Failed, error.message);
2022
}
2123
})();

0 commit comments

Comments
 (0)