marcinbojko / dive

Chocolatey package for https://github.com/wagoodman/dive
1 stars 1 forks source link

Internalize not possible #1

Open MBertling opened 1 month ago

MBertling commented 1 month ago

When trying to recompile the package with using local sources by running choco download dive --version 0.12.0 --internalize

the follow error came up:

Found 'https://github.com/wagoodman/dive/releases/download/v' for replacement.
Encountered error downloading package dive v0.12.0:
The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://github.com/wagoodman/dive/releases/download/v'.
  The remote server returned an error: (404) Not Found.

It seems that the choco function can't handle url strings with variables in chocolateyinstall.ps1.

marcinbojko commented 1 month ago

Unfortunately:

C:\ProgramData\Chocolatey\bin\choco.exe install dive -y -s . --allow-unofficial Chocolatey v2.3.0 Installing the following packages: dive By installing, you accept licenses for the packages. Downloading package from source 'D:\a\dive\dive'

dive v0.12.0 dive package files install completed. Performing other installation steps. Killing all instances of: dive* Attempt to get headers for https://github.com/wagoodman/dive/releases/download/v0.12.0/dive_.zip failed. The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://github.com/wagoodman/dive/releases/download/v0.12.0/dive_.zip'. Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (404) Not Found." Downloading dive 64 bit from 'https://github.com/wagoodman/dive/releases/download/v0.12.0/dive_.zip' ERROR: The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://github.com/wagoodman/dive/releases/download/v0.12.0/dive_.zip'. Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (404) Not Found." The install of dive was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\dive\tools\chocolateyinstall.ps1'. See log for details.

Chocolatey installed 0/1 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

marcinbojko commented 1 month ago

I did some changes in test branch - see if it solves your problem https://github.com/marcinbojko/dive/tree/test

MBertling commented 1 month ago

Yes that did the trick!

Found internalizable Chocolatey functions. Inspecting values for remote resources.
Chocolatey had an error formatting string:
 Input string was not in a correct format.
Found 'https://github.com/wagoodman/dive/releases/download/v0.12.0/dive_0.12.0_windows_amd64.zip' for replacement.
Downloading: 100% - 3.89 MB
Download of 'dive_0.12.0_windows_amd64.zip' completed.
Replacing 'https://github.com/wagoodman/dive/releases/download/v${version}/dive_${version}_windows_amd64.zip' with '$(Split-Path -parent $MyInvocation.MyCommand.Definition)\files\dive_0.12.0_windows_amd64.zip'

exited with code 0

marcinbojko commented 1 month ago

Awesome

⁣Get BlueMail for Android ​

On Sep 23, 2024, 15:50, at 15:50, Marcus @.***> wrote:

Yes that did the trick!

Found internalizable Chocolatey functions. Inspecting values for remote
resources.
Chocolatey had an error formatting string:
Input string was not in a correct format.
Found
'https://github.com/wagoodman/dive/releases/download/v0.12.0/dive_0.12.0_windows_amd64.zip'
for replacement.
Downloading: 100% - 3.89 MB
Download of 'dive_0.12.0_windows_amd64.zip' completed.
Replacing
'https://github.com/wagoodman/dive/releases/download/v${version}/dive_${version}_windows_amd64.zip'
with '$(Split-Path -parent
$MyInvocation.MyCommand.Definition)\files\dive_0.12.0_windows_amd64.zip'

exited with code 0

-- Reply to this email directly or view it on GitHub: https://github.com/marcinbojko/dive/issues/1#issuecomment-2368331002 You are receiving this because you commented.

Message ID: @.***>