Commit a8fc4c9
[installer] Do not follow an existing symbolic link when overwriting
Without `-h` option, `ln` command makes a symbolic link under the existing
link destination like `Toolchains/swift-DEVELOPMENT-SNAPSHOT-XX.xctoolchain/`.
```
$ ln -fs swift-DEVELOPMENT-SNAPSHOT-XX.xctoolchain swift-latest.xctoolchain
$ ln -fs swift-DEVELOPMENT-SNAPSHOT-YY.xctoolchain swift-latest.xctoolchain
$ tree
|-- swift-DEVELOPMENT-SNAPSHOT-XX.xctoolchain
| |-- swift-DEVELOPMENT-SNAPSHOT-YY.xctoolchain -> swift-DEVELOPMENT-SNAPSHOT-YY.xctoolchain
|-- swift-DEVELOPMENT-SNAPSHOT-YY.xctoolchain
|-- swift-latest.xctoolchain -> swift-DEVELOPMENT-SNAPSHOT-XX.xctoolchain
```
So we should not follow the existing symbolic link even if it already
exists.1 parent 3f10ccd commit a8fc4c9
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
0 commit comments