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

fix(turborepo): Use which crate to resolve yarn binary #5001

Merged
merged 6 commits into from May 17, 2023

Conversation

NicholasLYang
Copy link
Contributor

Description

Fixes #4940 by using which crate to resolve yarn binary. That way we use the correct extension, i.e. yarn.cmd on Windows.

Testing Instructions

Tested manually on Windows. Will add more integration tests

@vercel
Copy link

vercel bot commented May 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-kitchensink-blog 🔄 Building (Inspect) May 17, 2023 7:01pm
examples-nonmonorepo 🔄 Building (Inspect) May 17, 2023 7:01pm
9 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) May 17, 2023 7:01pm
examples-cra-web ⬜️ Ignored (Inspect) May 17, 2023 7:01pm
examples-designsystem-docs ⬜️ Ignored (Inspect) May 17, 2023 7:01pm
examples-gatsby-web ⬜️ Ignored (Inspect) May 17, 2023 7:01pm
examples-native-web ⬜️ Ignored (Inspect) May 17, 2023 7:01pm
examples-svelte-web ⬜️ Ignored (Inspect) May 17, 2023 7:01pm
examples-tailwind-web ⬜️ Ignored (Inspect) May 17, 2023 7:01pm
examples-vite-web ⬜️ Ignored (Inspect) May 17, 2023 7:01pm
turbo-site ⬜️ Ignored (Inspect) Visit Preview May 17, 2023 7:01pm

@gsoltis gsoltis mentioned this pull request May 17, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 17, 2023

🟢 CI successful 🟢

Thanks

crates/turborepo-lib/Cargo.toml Outdated Show resolved Hide resolved
@@ -76,7 +77,8 @@ fn execute_git_command(
args: &[&str],
pathspec: &str,
) -> Result<Vec<u8>, Error> {
let mut command = Command::new("git");
let git_binary = which("git")?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're going to use git a lot. We should perhaps memoize this and make it easy to use. Can do in a follow-up though.

Cargo.toml Outdated Show resolved Hide resolved
@@ -36,3 +36,48 @@ Set package manager to pnpm in package.json
Run test run
$ ${TURBO} run build --__test-run | jq .package_manager
"pnpm"

Clear package manager field in package.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to verify this manually on windows, these tests don't run there

@NicholasLYang NicholasLYang enabled auto-merge (squash) May 17, 2023 18:30
Cargo.toml Outdated
@@ -197,3 +197,4 @@ tracing-subscriber = "0.3.16"
url = "2.2.2"
urlencoding = "2.1.2"
webbrowser = "0.8.7"
which = "4.4.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the lack of a newline here is hitting the linter

@NicholasLYang NicholasLYang merged commit 3333dcb into main May 17, 2023
44 checks passed
@NicholasLYang NicholasLYang deleted the fix/windows-find-program branch May 17, 2023 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[turborepo] program not found error after upgrading to v1.9.4
3 participants