Skip to content

Commit b5a0010

Browse files
Task Lib - Logging Detected Agent Version in AssertAgent (#1101)
1 parent 40040a0 commit b5a0010

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

node/task.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,9 @@ export function assertAgent(minimum: string): void {
176176
}
177177

178178
let agent = getVariable('Agent.Version');
179+
debug('Detected Agent.Version=' + (agent ? agent : 'undefined'));
179180
if (agent && semver.lt(agent, minimum)) {
180-
throw new Error(`Agent version ${minimum} or higher is required`);
181+
throw new Error(`Agent version ${minimum} or higher is required. Detected Agent version: ${agent}`);
181182
}
182183
}
183184

@@ -2751,4 +2752,4 @@ if (!global['_vsts_task_lib_loaded']) {
27512752
im._loadData();
27522753
im._exposeProxySettings();
27532754
im._exposeCertSettings();
2754-
}
2755+
}

0 commit comments

Comments
 (0)