# check the exit code
code=$?
if [ $code -eq 0 ]; then
    # Now you can use the deployment url from stdout for the next step of your workflow
    deploymentUrl=`cat deployment-url.txt`
    echo $deploymentUrl
else
    # Handle the error
    errorMessage=`cat error.txt`
    echo "There was an error: $errorMessage"
fi
```

## Unique Options

These are options that only apply to the `vercel redeploy` command.

### No Wait

The `--no-wait` option does not wait for a deployment to finish before exiting from the `redeploy` command.

```bash filename="terminal"
vercel redeploy https://example-app-6vd6bhoqt.vercel.app --no-wait
```

### target

Use the `--target` option to define the environment you want to redeploy to. This could be production, preview, or a [custom environment](/docs/deployments/environments#custom-environments).

```bash filename="terminal"
vercel redeploy https://example-app-6vd6bhoqt.vercel.app --target=staging
```


--------------------------------------------------------------------------------
title: "vercel redirects"
description: "Learn how to manage project-level redirects using the vercel redirects CLI command."
last_updated: "2026-02-03T02:58:38.397Z"
source: "https://vercel.com/docs/cli/redirects"
--------------------------------------------------------------------------------