Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
add newline filtering to cmd.exe calls (fix #37)
Browse files Browse the repository at this point in the history
  • Loading branch information
mriedmann committed Mar 28, 2022
1 parent d2a5d48 commit c953749
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions docker/root/usr/local/bin/startup
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/sh
#!/bin/bash

set -eo pipefail

CMDSHELL="$(command -v cmd.exe || echo '/mnt/c/Windows/system32/cmd.exe')"
APPDATA=$(wslpath "$($CMDSHELL /V:OFF /C 'echo | set /p t=%APPDATA%' 2>/dev/null)")
APPDATA="$(wslpath "$($CMDSHELL /V:OFF /C 'echo %APPDATA%' | tr -d '\n\r')")"

mkdir -p "$APPDATA/DockerInWsl/config"

Expand Down
8 changes: 5 additions & 3 deletions docker/root/usr/local/bin/wsl-vpnkit
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/sh
#!/bin/bash

set -eo pipefail

CMDSHELL="$(command -v cmd.exe || echo '/mnt/c/Windows/system32/cmd.exe')"
PROGRAMFILES=$(wslpath "$($CMDSHELL /V:OFF /C 'echo | set /p t=%PROGRAMFILES%' 2>/dev/null)")
LOCALAPPDATA=$(wslpath "$($CMDSHELL /V:OFF /C 'echo | set /p t=%LOCALAPPDATA%' 2>/dev/null)")
PROGRAMFILES="$(wslpath "$($CMDSHELL /V:OFF /C 'echo %PROGRAMFILES%' | tr -d '\n\r')")"
LOCALAPPDATA="$(wslpath "$($CMDSHELL /V:OFF /C 'echo %LOCALAPPDATA%' | tr -d '\n\r')")"
CONF_PATH="$LOCALAPPDATA/DockerInWSL/wsl-vpnkit/wsl-vpnkit.conf"
HTTP_PROXY_CONFIG_PATH="$LOCALAPPDATA/DockerInWSL/wsl-vpnkit/http-proxy.json"
SOCKET_PATH="/var/run/wsl-vpnkit.sock"
Expand Down

0 comments on commit c953749

Please sign in to comment.