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

CopyFiles@2 fails on broken symlink even for a single file copy #107

Closed
fgervais opened this issue Jan 22, 2019 · 2 comments
Closed

CopyFiles@2 fails on broken symlink even for a single file copy #107

fgervais opened this issue Jan 22, 2019 · 2 comments

Comments

@fgervais
Copy link

This task fails because somewhere deep in $(Build.SourcesDirectory)/... is a broken symlink.

- task: CopyFiles@2
    inputs:
      sourceFolder: $(Build.SourcesDirectory)
      contents: 'MLO'
      targetFolder: $(Build.ArtifactStagingDirectory)

Unhandled: Failed find: ENOENT: no such file or directory, stat '/__w/1/s/arm-buildroot-linux-gnueabihf_sdk-buildroot/arm-buildroot-linux-gnueabihf/sysroot/bin/systemd-resolve'

I would not expect this task to fail on broken symlink but even less in this case because my content pattern resolves to a single file.

Anybody else think this is not the correct behavior?

How should I work around this given I cannot get rid of the symlink?

@afeblot
Copy link

afeblot commented Apr 1, 2019

I agree:

  • Broken symlinks should be copied as they are. the task should not fail.
  • And non-broken symlinks should also be copied as is, they should not be replaced by the link targets (I did not check what the current behavior actually is).

At least on unix platforms.

@stale
Copy link

stale bot commented Apr 25, 2020

In order to consolidate to fewer feedback channels, we've moved suggestions and issue reporting to Developer Community. Sorry for any confusion resulting from this move.

@stale stale bot closed this as completed Apr 26, 2020
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