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

[cli] Add client.cwd to unify all working directory related logic #10031

Merged
merged 4 commits into from May 26, 2023

Conversation

TooTallNate
Copy link
Member

A few commands were still checking on --cwd explicitly, which is incorrect since the entrypoint file already handles the directory change.

The new client.cwd property is a helper to make writing tests easier. Tests no longer need to chdir() explicitly and then revert afterwards.

A few commands were still checking on `--cwd` explicitly, which is
incorrect since the entrypoint file already handles the directory
change.

The new `client.cwd` property is a helper to make writing tests easier.
Tests no longer need to `chdir()` explicitly and then revert afterwards.
@changeset-bot
Copy link

changeset-bot bot commented May 26, 2023

🦋 Changeset detected

Latest commit: 44523df

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vercel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

}

set cwd(v: string) {
process.chdir(v);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is brilliant, love it!

@TooTallNate TooTallNate added the pr: automerge Automatically merge the PR when checks pass label May 26, 2023
@kodiakhq kodiakhq bot merged commit ef30a46 into main May 26, 2023
101 of 102 checks passed
@kodiakhq kodiakhq bot deleted the add/cli-client-cwd branch May 26, 2023 20:42
TooTallNate added a commit that referenced this pull request May 26, 2023
Follow-up to #10031 which broke the `link` unit tests on Windows.

For some reason Kodiak was a bad bot and merged the PR with failing
tests.
kodiakhq bot pushed a commit that referenced this pull request May 26, 2023
Follow-up to #10031 which broke the `link` unit tests on Windows.

For some reason Kodiak was a bad bot and merged the PR with failing tests <picture data-single-emoji=":rarityannoyed:" title=":rarityannoyed:"><img class="emoji" src="https://emoji.slack-edge.com/T0CAQ00TU/rarityannoyed/b62f8c87a5fb7239.png" alt=":rarityannoyed:" width="20" height="auto" align="absmiddle"></picture> 

_Note:_ Probably easier to review with [whitespace hidden](https://github.com/vercel/vercel/pull/10033/files?w=1).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: automerge Automatically merge the PR when checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants