I got an error: /bin/sh: 6: export: (x86)/Common: bad variable name
I can't to connect remote development wsl2
What happened?
2022-12-14 19:39:33,423 [ 308712] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-14 19:37:42,837 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- uname -sm
exit code: 1
stdout:
Linux x86_64
stderr is empty
2022-12-14 19:39:33,423 [ 308712] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-14 19:37:52,871 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- echo $SHELL
exit code: 1
stdout:
/bin/bash
stderr is empty
2022-12-14 19:39:33,423 [ 308712] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-14 19:38:02,911 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- command -v $0
exit code: 1
stdout:
/bin/bash
stderr is empty
2022-12-14 19:39:33,423 [ 308712] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-14 19:38:12,940 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- echo $shell
exit code: 1
stdout is empty
stderr is empty
2022-12-14 19:39:33,423 [ 308712] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-14 19:38:22,972 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- echo $FISH_VERSION
exit code: 1
stdout is empty
stderr is empty
2022-12-14 19:39:33,424 [ 308713] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-14 19:38:33,026 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- uname -sm
exit code: 1
stdout:
Linux x86_64
stderr is empty
2022-12-14 19:39:33,424 [ 308713] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-14 19:38:43,069 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- echo $SHELL
exit code: 1
stdout:
/bin/bash
stderr is empty
2022-12-14 19:39:33,424 [ 308713] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-14 19:38:53,110 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- command -v $0
exit code: 1
stdout:
/bin/bash
stderr is empty
2022-12-14 19:39:33,424 [ 308713] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-14 19:39:03,146 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- echo $shell
exit code: 1
stdout is empty
stderr is empty
2022-12-14 19:39:33,424 [ 308713] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-14 19:39:13,187 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- echo $FISH_VERSION
exit code: 1
stdout is empty
stderr is empty
2022-12-14 19:39:33,424 [ 308713] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-14 19:39:23,356 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- /bin/sh -lc "echo REMOTE_EXEC_OUTPUT_MARKER_ && echo $HOME"
exit code: 1
stdout is empty
stderr:
/bin/sh: 6: export: (x86)/Common: bad variable name
Please sign in to leave a comment.
Most likely incorrect WSL variables happened. Please show the output of
>/bin/sh -lc "echo REMOTE_EXEC_OUTPUT_MARKER_ && echo $HOME"
from the WSL, executed manually.
Gyulnara Nevezhina I fix this problem. WINDOWS PATH contain space.
Another question:
2022-12-18 23:12:12,088 [ 161991] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-18 23:11:51,851 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- echo $FISH_VERSION
exit code: 1
stdout is empty
stderr is empty
2022-12-18 23:12:12,088 [ 161991] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-18 23:12:02,000 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- /bin/sh -lc "echo REMOTE_EXEC_OUTPUT_MARKER_ && echo $HOME"
exit code: 1
stdout:
REMOTE_EXEC_OUTPUT_MARKER_
/root
stderr is empty
From my WSL2:
➜ /bin/sh -lc "echo REMOTE_EXEC_OUTPUT_MARKER_ && echo $HOME"
REMOTE_EXEC_OUTPUT_MARKER_
/root
What do
> echo $FISH_VERSION
and
> echo $SHELL
return?
Gyulnara Nevezhina
➜ pwd
/root
➜ echo $FISH_VERSION (output nothing)
➜ echo $SHELL
/usr/bin/zsh
➜ cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/bin/bash
/usr/bin/bash
/bin/rbash
/usr/bin/rbash
/bin/dash
/usr/bin/dash
/usr/bin/tmux
/usr/bin/screen
/bin/zsh
/usr/bin/zsh
Please try to replace "zsh" with a simple bash. We have some reports about unstable work with zsh for now.
Still doesn't fix
➜ chsh -s /bin/bash
2022-12-19 18:52:55,894 [ 118042] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-19 18:51:55,645 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- uname -sm
exit code: 1
stdout:
Linux x86_64
stderr is empty
2022-12-19 18:52:55,894 [ 118042] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-19 18:52:05,679 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- echo $SHELL
exit code: 1
stdout:
/bin/bash
stderr is empty
2022-12-19 18:52:55,894 [ 118042] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-19 18:52:15,709 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- command -v $0
exit code: 1
stdout:
/bin/bash
stderr is empty
2022-12-19 18:52:55,895 [ 118043] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-19 18:52:25,741 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- echo $shell
exit code: 1
stdout is empty
stderr is empty
2022-12-19 18:52:55,895 [ 118043] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-19 18:52:35,783 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- echo $FISH_VERSION
exit code: 1
stdout is empty
stderr is empty
2022-12-19 18:52:55,895 [ 118043] INFO - #c.j.g.s.d.LoggingHostCommandExecutorWrapper - 2022-12-19 18:52:45,850 - C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- /bin/sh -lc "echo REMOTE_EXEC_OUTPUT_MARKER_ && echo $HOME"
exit code: 1
stdout:
REMOTE_EXEC_OUTPUT_MARKER_
/root
stderr is empty