Archive Files task is geting wrong working directory
See original GitHub issuevar 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:
- Created 7 years ago
- Comments:7 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
Fixed by #2243