Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azure-pipelines-task-lib/node/docs /proxy.md contains a minor mistake on one of the samples #958

Closed
ycamargo opened this issue Jul 28, 2023 · 4 comments

Comments

@ycamargo
Copy link

Please check our current Issues to see if someone already reported this https://github.com/Microsoft/azure-pipelines-task-lib/issues

Environment

azure-pipelines-task-lib version: 4.4.0

Issue Description

The 2nd example on the (proxy.md document) is using the wrong name of the function to get Proxy configuration.
It is using let proxy = tl.getProxyConfiguration() instead of let proxy = tl.getHttpProxyConfiguration().

Expected behaviour

The example should be using let proxy = tl.getHttpProxyConfiguration() on the 3rd line:

import tl = require('azure-pipelines-task-lib/task');

async function run() {
    let proxy = tl.getHttpProxyConfiguration()
    
    process.env['http_proxy'] = proxy.proxyFormattedUrl;
    process.env['https_proxy'] = proxy.proxyFormattedUrl;
    const gitPath: string = tl.which('git');
    const gitPull = tl.tool(gitPath);
    await gitPull.exec()
}

run();

Actual behaviour

But, it uses let proxy = tl.getProxyConfiguration() instead, and this function doesn't exist:

import tl = require('azure-pipelines-task-lib/task');

async function run() {
    let proxy = tl.getProxyConfiguration()
    
    process.env['http_proxy'] = proxy.proxyFormattedUrl;
    process.env['https_proxy'] = proxy.proxyFormattedUrl;
    const gitPath: string = tl.which('git');
    const gitPull = tl.tool(gitPath);
    await gitPull.exec()
}

run();

Steps to reproduce

Just consult the Proxy module documentation.

Logs

N/A

@ycamargo
Copy link
Author

I've created the PR #959 to fix this

@LiliaSabitova
Copy link

Hi @ycamargo, thanks for reporting and creating a PR.
We are currently working on higher-priority issues, but we will take a look at this PR later.

@github-actions
Copy link

This issue has had no activity in 90 days. Please comment if it is not actually stale

@ycamargo
Copy link
Author

ycamargo commented Nov 5, 2023

It isn't completed yet. The PR is still pending one reviewer approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants