I am attempting to create a small PowerShell script to automate starting up my IDE for a particular research project I am working on in my University. Since I have a windows OS, I have to use WSL. The program works up until it gets to WSL.exe line, after which it doesn’t seem to execute the rest of the ps commands. Is there a fix for this? It’s not the end of the world but I am unsure how to do this; I would imagine there’s a relatively simple solution I am overlooking.
Here is the PS1 script I wrote. I execute it through the VSCode IDE, by the way:
“””
Write-Output “start”
Set-Location Desktop
Set-Location Example
#for anonymity
Set-Location “PASS Code”
Write-Output “before wsl”
wsl.exe
#stops working after this^
Write-Output “after wsl”
conda activate pass
Write-Output “after activating conda env”
code .
“””
I tried to look into this elsewhere but couldn’t find a particular solution to my situation. Any help would be greatly appreciated!
Gregory Friedman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.