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

Check for Chocolatey version using "choco list" instead of OneGet #6754

Merged
merged 1 commit into from Dec 7, 2018

Conversation

Projects
None yet
1 participant
@Daniel15
Member

Daniel15 commented Dec 2, 2018

Summary
Updates build-chocolatey.ps1 to search for an existing Yarn package using the choco list command, rather than using OneGet. For some reason I can't get OneGet to work properly on Windows Server 2016

The script now runs:

choco list yarn --exact --version $latest_version 

and checks if the output contains "0 packages found". This is a bit messy, but the choco command doesn't have an API that returns XML or JSON (ref chocolatey/choco#159, chocolatey/choco#1252), and I didn't want to hit their web API directly, so this will do for now.

Fixes #6189

Test plan
Manually executed the script

@Daniel15

This comment has been minimized.

Member

Daniel15 commented Dec 2, 2018

Before merging, I'll test on Server 2016 to ensure it works properly in that environment.

@Daniel15 Daniel15 merged commit c45fc99 into yarnpkg:master Dec 7, 2018

11 checks passed

Yarn Acceptance Tests #20181202.1 succeeded
Details
buildsize No significant change
Details
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: test-linux-node10 Your tests passed on CircleCI!
Details
ci/circleci: test-linux-node6 Your tests passed on CircleCI!
Details
ci/circleci: test-linux-node8 Your tests passed on CircleCI!
Details
ci/circleci: test-macos-node10 Your tests passed on CircleCI!
Details
ci/circleci: test-macos-node6 Your tests passed on CircleCI!
Details
ci/circleci: test-macos-node8 Your tests passed on CircleCI!
Details
ci/circleci: test-pkg-tests-linux-node8 Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@Daniel15 Daniel15 deleted the Daniel15:choco-fix branch Dec 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment