Flow.Launcher icon indicating copy to clipboard operation
Flow.Launcher copied to clipboard

BUG: Shell plugin calls syntax error

Open Burbenpho opened this issue 6 months ago • 6 comments

Checks

  • [x] I have checked that this issue has not already been reported.

  • [x] I am using the latest version of Flow Launcher.

  • [ ] I am using the prerelease version of Flow Launcher.

Problem Description

Shell plugin throws syntax error when I typed sfc /scannow or net start commands. When I run cmd with admin rights it has no error and command executes successfully.

I download proccess monitor, and it seems like command executes with "C:\Windows\System32\cmd.exe "/k sfc /scannow ". I think there is parsing error. Even shutdown /r /t 0 not works.

Commands without spaces works correctly.

Process monitor when FL starts cmd.exe: Command line: "C:\Windows\System32\cmd.exe "/k sfc /scannow "

To Reproduce

  1. Turn on Shell plugin
  2. Use Windows Terminal
  3. Use CMD option
  4. sfc /scannow command via shell plugin with admin rights throws syntax error
  5. net start [service] command via shell plugin with admin rights throws syntax error
  6. shutdown /r /t 0 command via shell plugin with admin rights throws syntax error

Screenshots

No response

Flow Launcher Version

1.20.0

Windows Build Number

Version 10.0.26100.4202

Error Log

No response

Burbenpho avatar Jun 07 '25 14:06 Burbenpho

Could you please check if pre-released version works for you?

https://github.com/Flow-Launcher/Prereleases

Jack251970 avatar Jun 07 '25 15:06 Jack251970

Nope, it doesn't works(

Burbenpho avatar Jun 07 '25 15:06 Burbenpho

Nope, it doesn't works(

Any issues in log file?

Jack251970 avatar Jun 07 '25 15:06 Jack251970

Nope

Burbenpho avatar Jun 07 '25 16:06 Burbenpho

@Burbenpho Hi, could you please check if #3734 can help?

https://ci.appveyor.com/project/JohnTheGr8/flow-launcher/builds/52241236/artifacts

Jack251970 avatar Jun 15 '25 13:06 Jack251970

+1, it gives out PositionalParameterNotFound error

C:\bin\script.ps1 : A positional parameter cannot be found that accepts argument ''.
    + CategoryInfo          : InvalidArgument: (:) [script.ps1], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : PositionalParameterNotFound,script.ps1

WhitespaceQ avatar Jun 16 '25 02:06 WhitespaceQ

+1, it gives out PositionalParameterNotFound error

C:\bin\script.ps1 : A positional parameter cannot be found that accepts argument ''.
    + CategoryInfo          : InvalidArgument: (:) [script.ps1], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : PositionalParameterNotFound,script.ps1

Hi, could you please check if this helps?

https://ci.appveyor.com/project/JohnTheGr8/flow-launcher/builds/52241236/artifacts

Jack251970 avatar Jun 16 '25 09:06 Jack251970

@Jack251970 working as intended, thanks!

WhitespaceQ avatar Jun 17 '25 02:06 WhitespaceQ

found another bug with the shell plugin. when ending your command with a \ backslash, it will double it up. So if I end with 3 back slashes, it will send 6.

soul4kills avatar Jun 27 '25 09:06 soul4kills

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 60 days.\n\nAlternatively this issue can be kept open by adding one of the following labels:\nkeep-fresh

github-actions[bot] avatar Aug 27 '25 02:08 github-actions[bot]

@soul4kills Could you please check if this issue still exists and open a new issue item with reproduction steps? Thanks!

Jack251970 avatar Sep 18 '25 07:09 Jack251970