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

Calling ChocolateyPack fails because it can't find choco.exe #160

Open
6 tasks done
flcdrg opened this issue Jun 10, 2024 · 3 comments
Open
6 tasks done

Calling ChocolateyPack fails because it can't find choco.exe #160

flcdrg opened this issue Jun 10, 2024 · 3 comments
Labels
Bug Issues where something has happened which was not expected or intended

Comments

@flcdrg
Copy link
Member

flcdrg commented Jun 10, 2024

Checklist

  • I confirm there are no unresolved issues reported on the Chocolatey Status page.
  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem.
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.
  • I confirm I am using official, and not unofficial, or modified, Chocolatey products.

What You Are Seeing?

Building the choco source using ./build.ps1 fails because it can't find choco.exe

It appears to assume that Chocolatey CLI has been previously installed, which is a bit surprising given that we're trying to build Chocolatey CLI!

What is Expected?

The ToolPath should be updated to point to the locally built choco.exe so that can be used.

How Did You Get This To Happen?

  1. ./build.ps1

System Details

  • Operating System: 11
  • Windows PowerShell version: 5.1

Installed Packages

n/a

Output Log

========================================
Prepare-NuGet-Packages
========================================

========================================
Create-Chocolatey-Packages
========================================
An error occurred when executing task 'Create-Chocolatey-Packages'.

----------------------------------------
Teardown
----------------------------------------
Starting Teardown...
Finished running tasks.
Error: One or more errors occurred.
        Could not locate choco.exe.

Additional Context

No response

@flcdrg flcdrg added the Bug Issues where something has happened which was not expected or intended label Jun 10, 2024
@TheCakeIsNaOH
Copy link
Member

It appears to assume that Chocolatey CLI has been previously installed, which is a bit surprising given that we're trying to build Chocolatey CLI!

It should be installed as a part of the setup.ps1 file:
https://github.com/chocolatey/choco/blob/develop/setup.ps1

@flcdrg
Copy link
Member Author

flcdrg commented Jun 11, 2024

Wouldn't it be better to use the choco.exe that you've just built locally (to essentially dogfood it)?

I never even noticed setup.ps1! It also looks outdated (given it tries to install Pester v2). Best I can tell, it isn't mentioned at all in the docs in the choco repo either.

@gep13
Copy link
Member

gep13 commented Jun 17, 2024

@flcdrg @TheCakeIsNaOH this is a difficult one as well 😄

Chocolatey.Cake.Recipe is meant to be used on multiple projects, and the build of Chocolatey CLI only happens on one of those.

I like the idea of dog-fooding the build of Chocolatey CLI, to perform the pack of the Chocolatey packages though.

For now, I have updated the build instructions in this PR to mention that Chocolatey CLI is an expectation.

If we can make the addition of the dog-fooding generic enough that we can trigger it on the Chocolatey CLI build alone, I would be happy to proceed with that change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues where something has happened which was not expected or intended
Projects
None yet
Development

No branches or pull requests

3 participants