Closed mbl-35 closed 2 years ago
connexion: ok
PS1> wslctl exec ubuntu-20.04.3
root@host:/mnt/c/# exit
PS1>
simple command : ok
PS1> wslctl exec ubuntu-20.04.3 echo "toto"
Execute command 'echo toto' on ubuntu-20.04.3-bps ...
toto
PS1>
simple command with error : ok
PS1> wslctl exec ubuntu-20.04.3 exit 1
Execute command 'exit 1' on ubuntu-20.04.3 ...
Error: Command result with errors
PS1> $LastExitCode
1
file with exit 0: ok
PS1> wslctl exec ubuntu-20.04.3 .\tests\test-called-script.sh
Execute test-called-script.sh on ubuntu-20.04.3 ...
SCRIPT_WINPATH=/mnt/c/wslctl/tests/test-called-script.sh
hello from script file !
PS1> $LastExitCode
0
same file without exit 0: ok
PS1> wslctl exec ubuntu-20.04.3 .\tests\test-called-script.sh
Execute test-called-script.sh on ubuntu-20.04.3 ...
SCRIPT_WINPATH=/mnt/c/wslctl/tests/test-called-script.sh
hello from script file !
PS1> $LastExitCode
0
same file without exit 1: ok
PS1> wslctl exec ubuntu-20.04.3 .\tests\test-called-script.sh
Execute test-called-script.sh on ubuntu-20.04.3 ...
SCRIPT_WINPATH=/mnt/c/wslctl/tests/test-called-script.sh
hello from script file !
Error: Command result with errors
PS1> $LastExitCode
1
NOT REPRODUCED FOR NOW ...
Need to hit
CTRL-C
to exit the remote command..