yusufcanb / tlm

Local CLI Copilot, powered by CodeLLaMa. 💻🦙
Apache License 2.0
1.24k stars 40 forks source link

Unable to execute commands using PowerShell 7 #27

Open alirezanet opened 5 months ago

alirezanet commented 5 months ago

Describe the bug I'm not able to execute any command in Windows terminal PowerShell 7

Console Output image

 Get-ExecutionPolicy
Unrestricted
󰋜 ~
󰍲 ❯ tlm s 'list files in this directory'
┃ > Thinking... (3.9161497s)
┃ > dir
┃ > Executing...

. : File C:\Users\AliReza\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded because
running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:3
+ . 'C:\Users\AliReza\Documents\WindowsPowerShell\Microsoft.PowerShell_ ...
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

tlm Version Which tlm version are you running? Type tlm version to get the version tlm 1.1 (a0ca50d) on windows/amd64

Platform Information (please complete the following information): Which operating system are you running on?- Windows 11

Additional context I think tlm doesn't work on PowerShell 7 which is the latest version of Powershell.

silverhairs commented 4 months ago

I think this is an issue on your execution policies. I don't own a windows computer but maybe you can try to open powershell as an admin and running the command

Set-ExecutionPolicy -ExecutionPolicy Unrestricted

This will allow your system to run scripts using powershell

alirezanet commented 4 months ago

hi @silverhairs Did you see the attached Image? the first command is my execution policy ... it is Unrestricted