Closed soredake closed 1 year ago
This is by design: https://github.com/farag2/Sophia-Script-for-Windows/blob/baf4159b1f282175c425de3734ef4d98a936ebfb/Download_Sophia.ps1#L34
Someone asked me and I check before downloading. Not OK for you?
It's a bit confusing that it downloads to $PWD if currently directory is not $HOME or $env:SystemRoot\System32, i've wondered why my script is not working, i called sudo ~\Downloads\Sophia*\Sophia.ps1 -Function <Function>
in script but to my surprise sophi script was not in downloads (probably current was changed when installing packages from choco/winget).
What if I add a new parametr to specifiy the output folder?
irm script.sophi.app -useb -Path D:\folder | iex
Ah, I couldn't... From now script will always be downloaded to a downloads folder.
https://github.com/farag2/Sophia-Script-for-Windows/commit/f006e0300b2ae458e37ab3d65302b4a900d8c2d0
Prerequisites
Steps to reproduce
1) Create
script.ps1
file withpowershell .\sophi.ps1
content. 2) Createsophi.ps1
file withirm script.sophi.app -useb | iex
content. 3) Runscript.ps1
4) Sophi will be downloaded to $PWD instead of ~/Downloads.Windows Version
Windows 11 Pro 22H2 22621.1555
Sophia Script version
6.4.4