azure-pipelines-task-lib 4.13.0 → 4.14.0
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.d.ts +2 -0
- package/internal.js +9 -1
- package/package.json +1 -1
- package/task.js +4 -2
package/internal.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import vm = require('./vault');
|
|
2
3
|
/**
|
|
3
4
|
* Hash table of known variable info. The formatted env var name is the lookup key.
|
|
@@ -137,3 +138,4 @@ export declare function _isRooted(p: string): boolean;
|
|
|
137
138
|
export declare function _normalizeSeparators(p: string): string;
|
|
138
139
|
export declare function _exposeProxySettings(): void;
|
|
139
140
|
export declare function _exposeCertSettings(): void;
|
|
141
|
+
export declare function isSigPipeError(e: NodeJS.ErrnoException): e is NodeJS.ErrnoException;
|
package/internal.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._exposeCertSettings = exports._exposeProxySettings = exports._normalizeSeparators = exports._isRooted = exports._getDirectoryName = exports._ensureRooted = exports._isUncPath = exports._loadData = exports._ensurePatternRooted = exports._getFindInfoFromPattern = exports._cloneMatchOptions = exports._legacyFindFiles_convertPatternToRegExp = exports._which = exports._checkPath = exports._exist = exports._debug = exports._error = exports._warning = exports._command = exports._getVariableKey = exports._getVariable = exports._loc = exports._setResourcePath = exports._setErrStream = exports._setStdStream = exports._writeLine = exports._truncateBeforeSensitiveKeyword = exports._endsWith = exports._startsWith = exports.IssueAuditAction = exports.IssueSource = exports._vault = exports._knownVariableMap = void 0;
|
|
3
|
+
exports.isSigPipeError = exports._exposeCertSettings = exports._exposeProxySettings = exports._normalizeSeparators = exports._isRooted = exports._getDirectoryName = exports._ensureRooted = exports._isUncPath = exports._loadData = exports._ensurePatternRooted = exports._getFindInfoFromPattern = exports._cloneMatchOptions = exports._legacyFindFiles_convertPatternToRegExp = exports._which = exports._checkPath = exports._exist = exports._debug = exports._error = exports._warning = exports._command = exports._getVariableKey = exports._getVariable = exports._loc = exports._setResourcePath = exports._setErrStream = exports._setStdStream = exports._writeLine = exports._truncateBeforeSensitiveKeyword = exports._endsWith = exports._startsWith = exports.IssueAuditAction = exports.IssueSource = exports._vault = exports._knownVariableMap = void 0;
|
|
4
4
|
var fs = require("fs");
|
|
5
5
|
var path = require("path");
|
|
6
6
|
var os = require("os");
|
|
@@ -923,3 +923,11 @@ function _exposeTaskLibSecret(keyFile, secret) {
|
|
|
923
923
|
return new Buffer(storageFile).toString('base64') + ':' + new Buffer(encryptedContent).toString('base64');
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
|
+
function isSigPipeError(e) {
|
|
927
|
+
var _a;
|
|
928
|
+
if (!e || typeof e !== 'object') {
|
|
929
|
+
return false;
|
|
930
|
+
}
|
|
931
|
+
return e.code === 'EPIPE' && ((_a = e.syscall) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === 'WRITE';
|
|
932
|
+
}
|
|
933
|
+
exports.isSigPipeError = isSigPipeError;
|
package/package.json
CHANGED
package/task.js
CHANGED
|
@@ -102,8 +102,10 @@ exports.setSanitizedResult = setSanitizedResult;
|
|
|
102
102
|
// Catching all exceptions
|
|
103
103
|
//
|
|
104
104
|
process.on('uncaughtException', function (err) {
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
if (!im.isSigPipeError(err)) {
|
|
106
|
+
setResult(TaskResult.Failed, exports.loc('LIB_UnhandledEx', err.message));
|
|
107
|
+
exports.error(String(err.stack), im.IssueSource.TaskInternal);
|
|
108
|
+
}
|
|
107
109
|
});
|
|
108
110
|
//
|
|
109
111
|
// Catching unhandled rejections from promises and rethrowing them as exceptions
|