azure-pipelines-task-lib 4.8.0 → 4.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/internal.js +4 -4
- package/package.json +1 -1
- package/task.js +7 -7
package/internal.js
CHANGED
|
@@ -33,7 +33,7 @@ var IssueSource;
|
|
|
33
33
|
//-----------------------------------------------------
|
|
34
34
|
// async await needs generators in node 4.x+
|
|
35
35
|
if (semver.lt(process.versions.node, '4.2.0')) {
|
|
36
|
-
_warning('Tasks require a new agent. Upgrade your agent or node to 4.2.0 or later');
|
|
36
|
+
_warning('Tasks require a new agent. Upgrade your agent or node to 4.2.0 or later', IssueSource.TaskInternal);
|
|
37
37
|
}
|
|
38
38
|
//-----------------------------------------------------
|
|
39
39
|
// String convenience
|
|
@@ -124,7 +124,7 @@ function _loadLocStrings(resourceFile, culture) {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
else {
|
|
127
|
-
_warning('LIB_ResourceFile does not exist');
|
|
127
|
+
_warning('LIB_ResourceFile does not exist', IssueSource.TaskInternal);
|
|
128
128
|
}
|
|
129
129
|
return locStrings;
|
|
130
130
|
}
|
|
@@ -159,7 +159,7 @@ function _setResourcePath(path, ignoreWarnings) {
|
|
|
159
159
|
_debug(_loc('LIB_ResourceFileAlreadySet', path));
|
|
160
160
|
}
|
|
161
161
|
else {
|
|
162
|
-
_warning(_loc('LIB_ResourceFileAlreadySet', path));
|
|
162
|
+
_warning(_loc('LIB_ResourceFileAlreadySet', path), IssueSource.TaskInternal);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
}
|
|
@@ -193,7 +193,7 @@ function _loc(key) {
|
|
|
193
193
|
}
|
|
194
194
|
else {
|
|
195
195
|
if (Object.keys(_resourceFiles).length <= 0) {
|
|
196
|
-
_warning("Resource file haven't been set, can't find loc string for key: " + key);
|
|
196
|
+
_warning("Resource file haven't been set, can't find loc string for key: " + key, IssueSource.TaskInternal);
|
|
197
197
|
}
|
|
198
198
|
else {
|
|
199
199
|
_warning("Can't find loc string for key: " + key);
|
package/package.json
CHANGED
package/task.js
CHANGED
|
@@ -68,10 +68,10 @@ function setResult(result, message, done) {
|
|
|
68
68
|
exports.debug('task result: ' + TaskResult[result]);
|
|
69
69
|
// add an error issue
|
|
70
70
|
if (result == TaskResult.Failed && message) {
|
|
71
|
-
exports.error(message);
|
|
71
|
+
exports.error(message, exports.IssueSource.TaskInternal);
|
|
72
72
|
}
|
|
73
73
|
else if (result == TaskResult.SucceededWithIssues && message) {
|
|
74
|
-
exports.warning(message);
|
|
74
|
+
exports.warning(message, exports.IssueSource.TaskInternal);
|
|
75
75
|
}
|
|
76
76
|
// task.complete
|
|
77
77
|
var properties = { 'result': TaskResult[result] };
|
|
@@ -86,7 +86,7 @@ exports.setResult = setResult;
|
|
|
86
86
|
//
|
|
87
87
|
process.on('uncaughtException', function (err) {
|
|
88
88
|
setResult(TaskResult.Failed, exports.loc('LIB_UnhandledEx', err.message));
|
|
89
|
-
exports.error(String(err.stack));
|
|
89
|
+
exports.error(String(err.stack), im.IssueSource.TaskInternal);
|
|
90
90
|
});
|
|
91
91
|
//
|
|
92
92
|
// Catching unhandled rejections from promises and rethrowing them as exceptions
|
|
@@ -815,7 +815,7 @@ function cp(source, dest, options, continueOnError, retryCount) {
|
|
|
815
815
|
catch (e) {
|
|
816
816
|
if (retryCount <= 0) {
|
|
817
817
|
if (continueOnError) {
|
|
818
|
-
exports.warning(e);
|
|
818
|
+
exports.warning(e, exports.IssueSource.TaskInternal);
|
|
819
819
|
break;
|
|
820
820
|
}
|
|
821
821
|
else {
|
|
@@ -865,7 +865,7 @@ function retry(func, args, retryOptions) {
|
|
|
865
865
|
catch (e) {
|
|
866
866
|
if (retryOptions.retryCount <= 0) {
|
|
867
867
|
if (retryOptions.continueOnError) {
|
|
868
|
-
exports.warning(e);
|
|
868
|
+
exports.warning(e, exports.IssueSource.TaskInternal);
|
|
869
869
|
break;
|
|
870
870
|
}
|
|
871
871
|
else {
|
|
@@ -965,7 +965,7 @@ function find(findPath, options) {
|
|
|
965
965
|
}
|
|
966
966
|
catch (err) {
|
|
967
967
|
if (err.code == 'ENOENT' && options.skipMissingFiles) {
|
|
968
|
-
exports.warning("No such file or directory: \"" + item.path + "\" - skipping.");
|
|
968
|
+
exports.warning("No such file or directory: \"" + item.path + "\" - skipping.", exports.IssueSource.TaskInternal);
|
|
969
969
|
return "continue";
|
|
970
970
|
}
|
|
971
971
|
throw err;
|
|
@@ -2071,7 +2071,7 @@ exports.ToolRunner = trm.ToolRunner;
|
|
|
2071
2071
|
//-----------------------------------------------------
|
|
2072
2072
|
// async await needs generators in node 4.x+
|
|
2073
2073
|
if (semver.lt(process.versions.node, '4.2.0')) {
|
|
2074
|
-
exports.warning('Tasks require a new agent. Upgrade your agent or node to 4.2.0 or later');
|
|
2074
|
+
exports.warning('Tasks require a new agent. Upgrade your agent or node to 4.2.0 or later', exports.IssueSource.TaskInternal);
|
|
2075
2075
|
}
|
|
2076
2076
|
//-------------------------------------------------------------------
|
|
2077
2077
|
// Populate the vault with sensitive data. Inputs and Endpoints
|