Skip to content

Commit b585058

Browse files
authored
Recommend ~/.zprofile instead of ~/.zshenv for path setup on macOS (#12512)
Resolves #12461 **Staged:** https://flutter-docs-prod--pr12512-fix-12461-tri6lxdw.web.app/install/add-to-path#macos
1 parent 1d158ad commit b585058

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/_includes/docs/install/path/macos.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
:::note
22
The following steps assume you're
33
using the [default shell][zsh-mac] on macOS, Zsh.
4-
Zsh uses the `.zshenv` file for configuring [environment variables][zsh-files].
54

65
If you use another shell besides Zsh,
76
check out [this tutorial on setting your PATH][other-path].
@@ -14,17 +13,17 @@ check out [this tutorial on setting your PATH][other-path].
1413

1514
1. <h3>Open or create the Zsh environment variable file</h3>
1615

17-
If it exists, open the Zsh environment variable file `~/.zshenv`
18-
in your preferred text editor.
19-
If it doesn't exist, create the `~/.zshenv` file.
16+
If it exists, open the [Zsh environment variable file][zsh-files]
17+
`~/.zprofile` in your preferred text editor.
18+
If it doesn't exist, create the `~/.zprofile` file.
2019

2120
1. <h3>Add the Flutter SDK bin to your path</h3>
2221

23-
At the end of your `~/.zshenv` file,
22+
At the end of your `~/.zprofile` file,
2423
use the built-in `export` command to update the `PATH` variable
2524
to include the `bin` directory of your Flutter installation.
2625

27-
Replace `<path-to-sdk>` with the path to your Flutter SDK install.
26+
Replace `<path-to-sdk>` with the path to your Flutter SDK installation.
2827

2928
```bash
3029
export PATH="<path-to-sdk>/bin:$PATH"
@@ -40,7 +39,7 @@ check out [this tutorial on setting your PATH][other-path].
4039
4140
1. <h3>Save your changes</h3>
4241
43-
Save, then close, the `~/.zshenv` file you edited.
42+
Save, then close, the `~/.zprofile` file you edited.
4443
4544
1. <h3>Apply your changes</h3>
4645

0 commit comments

Comments
 (0)