Commit 4a9ec4e
authored
fix: in
On Windows, the path to `mise.exe` will contain backslashes.
Both `busybox.exe bash` and Git-for-Windows' "Git Bash" can understand
these backslash paths.
But bash syntax rules dictate that unquoted backslashes are interpreted
as escapes. We must wrap the path in single-quotes to avoid this.
```bash
# In "Git Bash" or "busybox.exe bash"
# Backslash paths are accepted
$ 'G:\dev\@jdx\mise\target\debug\mise.exe' --version
...
2025.11.5-DEBUG windows-x64 (2025-11-18)
# But unqouted is broken
# because bash's syntax rules will interpret any unquoted backslashes as escapes
$ G:\dev\@jdx\mise\target\debug\mise.exe --version
bash: G:[email protected]: not found
```
Quoting is *technically* more correct on Linux, too, even though the
issues it avoids -- splitting on spaces -- are largely hypothetical.[^1]
I can't think of any way that this code change would break someone's
legitimate setup on Linux or Mac.
[^1]: To be pedantic, if the path to `mise` includes a single-quote --
if the name of a parent directory has a single-quote in it -- then this
will be broken on Linux, but it would *already* be broken before this
code change, so we are not making it worse.activate bash output, wrap mise executable path in single-quotes (jdx#7002)1 parent 16a43ed commit 4a9ec4e
2 files changed
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
0 commit comments