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

Unable to pass command line parameters after the double dash in Windows Terminal #18232

Open
hh54188 opened this issue Nov 21, 2024 · 2 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@hh54188
Copy link

hh54188 commented Nov 21, 2024

Windows Terminal version

1.21.2911.0

Windows build number

10.0.19045.2604

Other Software

Node: v20.16.0
NPM: 10.8.1

Steps to reproduce

Here is the command I want to run on Windows Terminal:

pm2 start C:\Users\User\AppData\Roaming\npm\node_modules\http-server\bin\http-server --name http-server-app -- --port 3000

If I run it in the Windows Terminal, I will get this error:

error: unknown option `--port'.

The same error will appear in the Powershell. But it will succeed in the Command Line.

Is there a way to solve this problem?

Expected Behavior

The port number parameter can be passed to the command line successfully.

Actual Behavior

error: unknown option `--port'.

@hh54188 hh54188 added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Nov 21, 2024
@DHowett
Copy link
Member

DHowett commented Nov 21, 2024

When you say “in Windows Terminal,” is there a chance you mean “in PowerShell”?

Terminal supports running different shells, like PowerShell and Command Prompt.

If you are seeing a difference in argument handling, there is a chance you are not using the shell you are expecting.

EDIT: ah, I see you included that info in your original issue.

@DHowett
Copy link
Member

DHowett commented Nov 21, 2024

Is there a way to solve this problem?

You can run Command Prompt inside Windows Terminal. Please consult the dropdown menu for either a one-off option to run Command Prompt or a permanent option to configure your “Default Profile”.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

2 participants