mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 12:57:46 +00:00
Catch path alias scaling (#1057)
* Catch path alias scaling * Better wording * Fix grammar mistake
This commit is contained in:
committed by
Leo Lamprecht
parent
c93eed08fc
commit
0d8b4a8386
12
errors/scaling-path-alias.md
Normal file
12
errors/scaling-path-alias.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Scaling path alias
|
||||
|
||||
#### Why This Error Occurred
|
||||
|
||||
You tried to use `now scale` on a path alias (`now alias -r rules.json`).
|
||||
|
||||
#### Possible Ways to Fix It
|
||||
|
||||
Path aliases are routes to instances. Instances can be scaled independent from each other.
|
||||
You can view path aliases by running `now alias ls <id>`.
|
||||
|
||||
Documentation for Path Aliases can be found [here](https://zeit.co/docs/features/path-aliases).
|
||||
@@ -195,6 +195,13 @@ async function run({ token, sh: { currentTeam } }) {
|
||||
console.error(error(`Could not find any deployments matching ${id}`))
|
||||
return process.exit(1)
|
||||
}
|
||||
|
||||
// Alias is a path alias, these can't be scaled.
|
||||
if(aliasDeployment.rules && aliasDeployment.rules.length > 0) {
|
||||
console.error(error(`Requested identifier is a path alias. https://err.sh/now-cli/scaling-path-alias`))
|
||||
return process.exit(1)
|
||||
}
|
||||
|
||||
match = deployments.find(d => {
|
||||
return d.uid === aliasDeployment.deploymentId
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user