tlm icon indicating copy to clipboard operation
tlm copied to clipboard

Unable to execute commands using PowerShell 7

Open alirezanet opened this issue 1 year ago • 2 comments

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.

alirezanet avatar Jun 24 '24 17:06 alirezanet

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

silverhairs avatar Jul 26 '24 00:07 silverhairs

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

alirezanet avatar Jul 26 '24 13:07 alirezanet

@alirezanet Please check the pre-release of 1.2. I had no issues on PowerShell 7.5.0. It also has model selection feature people wanted since the very beginning.

https://github.com/yusufcanb/tlm/releases/tag/1.2-pre

yusufcanb avatar Jan 31 '25 01:01 yusufcanb