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.

Archive Files task is geting wrong working directory

See original GitHub issue

var winSevenZipLocation = path.join(tl.cwd(), '7zip/7z.exe');

this line translates into this command C:\tfs_agent\_work\1\s\7zip\7z.exe when tool runs. Instead of C:\tfs_agent\_work\_tasks\ArchiveFiles_d8b84976-e99a-4b86-b885-4849694435b0\1.0.2\7zip\7z.exe

Seems like when task is created - CWD points to source directory

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
bryanmacfarlanecommented, Aug 9, 2016

Yes, by default if not specified the current working directory of a task is the root of the repo.

Jason, __dirname would be the location of the script.

See if path.join(__dirname, ‘7zip/7z.exe’); works

0reactions
davidstahelicommented, Aug 23, 2016

Fixed by #2243

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Pipeline Archive fails no such file or directory
I solved the issue finally. See the Pipeline I am using below. Create a new VS Solution and a new Class Library Project....
Read more >
ArchiveFiles@2 - Archive files v2 task - Microsoft Learn
Archive files v2 # Compress files into .7z, .tar.gz, or .zip. - task: ArchiveFiles@2 inputs: rootFolderOrFile: '$(Build.
Read more >
Why tar is incapable of changing current directory?
So in this case the problem is that you are creating tar archive of directory you are currently in. Share.
Read more >
zip - Change working directory - Unix & Linux Stack Exchange
If you want to zip the content of a given directory and store the zip file in the current directory, you can write...
Read more >
Unison Wiki | Main / UnisonFAQTroubleshooting
Why do I keep getting "Warning: No archive files were found for these roots"? ... This can happen if your hostname changes (for...
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