Commit c9d444c
Make os.home a def (#239)
In some environments the home directory is not configured, thus
`user.home` can be set to e.g. "?" (like in the issue the Scala CLI team
has bumped into). See [OpenJDK
sources](https://github.com/openjdk/jdk/blob/master/src/java.base/unix/native/libjava/java_props_md.c#L508)
In those cases using e.g. `os.pwd` throws, since the `os.home` is also
initialized.
This fix allows `os.pwd` to still be used when `user.home` is set to
something weird.
One example of such environment with `user.home` set to "?" is running
Jenking on CloudBees, the results of trying to run Scala CLI there
looked like this, since we heavily use os.pwd in our code base:
Pull request: #239
---------
Co-authored-by: Lorenzo Gabriele <lorenzolespaul@gmail.com>
Co-authored-by: Tobias Roeser <le.petit.fou@web.de>1 parent 650dee6 commit c9d444c
File tree
4 files changed
+43
-2
lines changed- os
- nohometest/src
- src-jvm
- src-native
4 files changed
+43
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
26 | 33 | | |
27 | 34 | | |
28 | 35 | | |
29 | | - | |
| 36 | + | |
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
22 | | - | |
| 29 | + | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
| |||
0 commit comments