question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Container PATH being overridden (Caused by ##vso[task.appendpath])

See original GitHub issue

When running a build within a container (YAML container builds) the running container’s PATH is getting overridden with the host’s PATH, plus values for various tasks (nuget tool for instance). Is there a way to set this to prepend or append to the container PATH?

This seems related to #109 but that was from before container builds were generally available. I’m seeing the same effect though. When I run the container directly (outside of Pipelines) I see the expected PATH value (local binary paths, etc). But when the pipelines agent runs it, $ENV:PATH shows a value that matches what the host has, overriding what the container had when started.

I also posted a question about this on the developer community but I’ve only received one response that didn’t assist.

Here’s part of the debug from a build:

##[debug]Set env: Path=C:\__t\NuGet\4.3.0\ia32;C:\[MYSERVERNAME]\externals\git\cmd;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Docker;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps

But I expect to see a PATH that includes things such as the NETFX directories and other binaries that I’ve added.

Agent Version: 2.141.1 Commit: 8c0163e534b3740f4959826c54b099d679a64458 Host: Datacenter-Core-1803-with-Containers-smalldisk (Nothing else installed except the Pipelines agent) Agent is running as a service (Local System) Container: Based on microsoft/dotnet-framework:4.7.2-sdk-windowsservercore-1803 (but adds other binaries) VisualStudio.com/dev.azure.com (-not- on prem tfs)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
TingluoHuangcommented, Nov 13, 2018

@davidroberts63 yep, i will fix that in next agent release.

0reactions
TingluoHuangcommented, Dec 17, 2018

close this issue since 2.144.0 has released to the service.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Logging commands - Azure Pipelines
To invoke a logging command, echo the command via standard output. ... File paths should be given as absolute paths: rooted to a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found