majkinetor / au

Chocolatey Automatic Package Updater Module
GNU General Public License v2.0
227 stars 71 forks source link

Change path to package #251

Closed kamack38 closed 2 years ago

kamack38 commented 2 years ago

Can I change path to where I want to save .nupkg files?

For Example : I have package 1 and package 2

├───package 1
│   └───tools
├───package 2
│   └───tools
└───nupkgs

And I want to save the files to nupkgs folder. How can I do that?

majkinetor commented 2 years ago

No.

You can only move files afterwards, perhaps as a custom plugin in update_all in AfterEach script.

kamack38 commented 2 years ago
AfterEach = {
    Get-ChildItem -Depth 1 | Where-Object Name -Match .*.nupkg | Move-Item -Destination .\nupkgs\ -Force
}

I've added this to update_all.ps1, but how can I add this inti test_all.ps1?

kamack38 commented 2 years ago

I've added hti into test_all.ps1

$options = [ordered]@{
    AfterEach = {
        Get-ChildItem -Depth 1 | Where-Object Name -Match .*.nupkg | Move-Item -Destination ..\nupkgs\ -Force
    }
}

And now it works! Thank you for your cooperation.

majkinetor commented 2 years ago

No problem :)