Commit cdbdbb0
committed
install: guard against duplicate PATH entries on reinstall
Running the installer twice without restarting the shell causes the
PATH configuration line to be appended to the shell profile a second
time, since the script only checks whether copilot is in PATH (which
requires a shell restart to take effect) before prompting.
Check whether the exact PATH_LINE already exists in RC_FILE before
appending. This makes the write idempotent—reinstalls and upgrades
skip the duplicate and report that the configuration is already
present.1 parent 13653ea commit cdbdbb0
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
179 | | - | |
180 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
181 | 185 | | |
182 | 186 | | |
183 | 187 | | |
| |||
0 commit comments