azure-pipelines-task-lib 5.1.0 → 5.2.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/package.json +1 -1
- package/task.js +6 -3
package/package.json
CHANGED
package/task.js
CHANGED
|
@@ -149,8 +149,9 @@ function assertAgent(minimum) {
|
|
|
149
149
|
throw new Error('assertAgent() requires the parameter to be 2.104.1 or higher');
|
|
150
150
|
}
|
|
151
151
|
var agent = (0, exports.getVariable)('Agent.Version');
|
|
152
|
+
(0, exports.debug)('Detected Agent.Version=' + (agent ? agent : 'undefined'));
|
|
152
153
|
if (agent && semver.lt(agent, minimum)) {
|
|
153
|
-
throw new Error("Agent version ".concat(minimum, " or higher is required"));
|
|
154
|
+
throw new Error("Agent version ".concat(minimum, " or higher is required. Detected Agent version: ").concat(agent));
|
|
154
155
|
}
|
|
155
156
|
}
|
|
156
157
|
exports.assertAgent = assertAgent;
|
|
@@ -1024,7 +1025,8 @@ function cp(sourceOrOptions, destinationOrSource, optionsOrDestination, continue
|
|
|
1024
1025
|
}
|
|
1025
1026
|
try {
|
|
1026
1027
|
if (lstatSource.isSymbolicLink()) {
|
|
1027
|
-
|
|
1028
|
+
var symlinkTarget = fs.readlinkSync(source);
|
|
1029
|
+
source = path.resolve(path.dirname(source), symlinkTarget);
|
|
1028
1030
|
lstatSource = fs.lstatSync(source);
|
|
1029
1031
|
}
|
|
1030
1032
|
if (lstatSource.isFile()) {
|
|
@@ -1062,7 +1064,8 @@ var copyDirectoryWithResolvedSymlinks = function (src, dest, force) {
|
|
|
1062
1064
|
destPath = path.join(dest, entry.name);
|
|
1063
1065
|
if (entry.isSymbolicLink()) {
|
|
1064
1066
|
// Resolve the symbolic link and copy the target
|
|
1065
|
-
var
|
|
1067
|
+
var symlinkTarget = fs.readlinkSync(srcPath);
|
|
1068
|
+
var resolvedPath = path.resolve(path.dirname(srcPath), symlinkTarget);
|
|
1066
1069
|
var stat = fs.lstatSync(resolvedPath);
|
|
1067
1070
|
if (stat.isFile()) {
|
|
1068
1071
|
// Use the actual target file's name instead of the symbolic link's name
|