mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 04:22:12 +00:00
[cli] Add support for vc --cwd <dir> (#7577)
`vc`'s default command is `deploy`, which can lead to ambiguous cli invocations when running `vc dir-or-command` like: ``` $ vc list Vercel CLI 23.1.2 Error! The supplied argument "list" is ambiguous. If you wish to deploy the subdirectory "list", first run "cd list". ``` when run in a directory that contains a subdirectory "list". This conflict will happen with any current and future commands, like `vc build`. In order to make sure the CLI can be invoked either way, this PR deprecates the default behavior. Going forward, a user would see the following. **Conflicting Command, Run Command** ```bash $ vc list # warning: Did you mean to deploy the subdirectory "list"? Use `vc --cwd list` instead. # ... runs the `list` command ``` **Conflicting Command, Deploy Directory** ```bash $ vc --cwd list # ... deploy as normal ``` --- Card: https://linear.app/vercel/issue/BUI-33/prevent-ambiguous-vc-command-oror-dir
This commit is contained in:
@@ -77,13 +77,13 @@ export const defaultProject = {
|
||||
};
|
||||
|
||||
export function useProject(project = defaultProject) {
|
||||
client.scenario.get(`/projects/${project.name}`, (_req, res) => {
|
||||
client.scenario.get(`/v8/projects/${project.name}`, (_req, res) => {
|
||||
res.json(project);
|
||||
});
|
||||
client.scenario.get(`/projects/${project.id}`, (_req, res) => {
|
||||
client.scenario.get(`/v8/projects/${project.id}`, (_req, res) => {
|
||||
res.json(project);
|
||||
});
|
||||
client.scenario.get(`/v7/projects/${project.id}/env`, (_req, res) => {
|
||||
client.scenario.get(`/v8/projects/${project.id}/env`, (_req, res) => {
|
||||
res.json({ envs });
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user