Skip to content

Commit b7c49fb

Browse files
committed
Add a warning about /etc/wsl.conf being overwritten
1 parent d29d157 commit b7c49fb

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

readme/README_template.md

+5
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,11 @@ This can be used to adjust various settings as documented at
193193
https://docs.microsoft.com/en-us/windows/wsl/wsl-config#configuration-settings-for-wslconf.
194194
This can also be used if the distribution is installed already.
195195

196+
**WARNING:** Setting this option will overwrite any existing content of the file.
197+
Some distributions like Ubuntu-24.04 might already ship with a wsl.conf file.
198+
Make sure to check whether a file exists by default and whether you want to included
199+
its contents in your configured value.
200+
196201
**Default value:** none
197202

198203
_**Example:**_

src/main/kotlin/net/kautler/github/action/setup_wsl/SetupWsl.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ suspend fun main() {
270270
}
271271

272272
if (wslConf.isNotEmpty()) {
273-
group("Create /etc/wsl.conf", ::createWslConf)
273+
group("Create or overwrite /etc/wsl.conf", ::adjustWslConf)
274274
}
275275

276276
if (setAsDefault()) {
@@ -356,7 +356,7 @@ suspend fun installDistribution() {
356356
)
357357
}
358358

359-
suspend fun createWslConf() {
359+
suspend fun adjustWslConf() {
360360
exec(
361361
commandLine = "wsl",
362362
args = arrayOf(

0 commit comments

Comments
 (0)