Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Run with PowerShell toolbar button doesn't quote path #16454

Open
Josh65-2201 opened this issue Nov 10, 2024 · 2 comments · May be fixed by #16455
Open

Bug: Run with PowerShell toolbar button doesn't quote path #16454

Josh65-2201 opened this issue Nov 10, 2024 · 2 comments · May be fixed by #16455
Labels
good first issue Good issue for new contributors to get started with

Comments

@Josh65-2201
Copy link
Member

Description

Steps To Reproduce

  1. Create PowerShell file with a space in the name or path
  2. Click run with PowerShell toolbar button
  3. PowerShell cuts of path saying file doesn't exist

Files Version

3.7.11.0

Windows Version

10.0.26100.2033

User ID

3372b393-b294-495c-9814-4e5b48d9fd8d

Log File

debug.log

@0x5bfa
Copy link
Member

0x5bfa commented Nov 10, 2024

return Win32Helper.RunPowershellCommandAsync($"{context.ShellPage?.SlimContentPage?.SelectedItem?.ItemPath}", PowerShellExecutionOptions.None);

-return Win32Helper.RunPowershellCommandAsync($"{context.ShellPage?.SlimContentPage?.SelectedItem?.ItemPath}", PowerShellExecutionOptions.None);
+return Win32Helper.RunPowershellCommandAsync($@"""{context.ShellPage?.SlimContentPage?.SelectedItem?.ItemPath}""", PowerShellExecutionOptions.None);

@Lamparter
Copy link
Contributor

Easier done than said 😁

@yaira2 yaira2 moved this from 🆕 New to 🏗 In progress in Files task board Nov 10, 2024
@yaira2 yaira2 added the good first issue Good issue for new contributors to get started with label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good issue for new contributors to get started with
Projects
Status: 🏗 In progress
4 participants