Skip to content

Commit

Permalink
Add a warning about /etc/wsl.conf being overwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
Vampire committed May 27, 2024
1 parent d29d157 commit b7c49fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions readme/README_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ This can be used to adjust various settings as documented at
https://docs.microsoft.com/en-us/windows/wsl/wsl-config#configuration-settings-for-wslconf.
This can also be used if the distribution is installed already.

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

**Default value:** none

_**Example:**_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ suspend fun main() {
}

if (wslConf.isNotEmpty()) {
group("Create /etc/wsl.conf", ::createWslConf)
group("Create or overwrite /etc/wsl.conf", ::adjustWslConf)
}

if (setAsDefault()) {
Expand Down Expand Up @@ -356,7 +356,7 @@ suspend fun installDistribution() {
)
}

suspend fun createWslConf() {
suspend fun adjustWslConf() {
exec(
commandLine = "wsl",
args = arrayOf(
Expand Down

0 comments on commit b7c49fb

Please sign in to comment.