Commit f5a8ffb
committed
fix(deisctl): properly resolve ~ in path
While `$HOME` is resolved properly in paths, `~` is not
and requires special handling.
I tested this with the following, on both bash and zsh:
```console
$ deisctl config platform set sshPrivateKey=$HOME/.ssh/deis
$ deisctl config platform set sshPrivateKey=~/.ssh/deis
$ deisctl config platform set sshPrivateKey=/Users/carmstrong/.ssh/deis
$ DEISCTL_UNITS=/Users/carmstrong/gocode/src/github.com/deis/deis/deisctl/units deisctl refresh-units
$ DEISCTL_UNITS=$HOME/gocode/src/github.com/deis/deis/deisctl/units deisctl refresh-units
$ DEISCTL_UNITS=~/gocode/src/github.com/deis/deis/deisctl/units deisctl refresh-units
```
fixes #26771 parent b4fd8e3 commit f5a8ffb
3 files changed
Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
631 | 630 | | |
632 | 631 | | |
633 | 632 | | |
634 | | - | |
635 | | - | |
636 | | - | |
| 633 | + | |
637 | 634 | | |
638 | 635 | | |
639 | 636 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
75 | | - | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments