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

Execution in CMD Instead of Default Terminal Profile on Windows #53

Open
MoellerMarcel opened this issue May 19, 2023 · 0 comments
Open
Labels
os: windows Issues that affect users on Windows. state: needs triage Waiting to be triaged by a maintainer.

Comments

@MoellerMarcel
Copy link

First of all, thanks for developing this awesome extension!

I'm running vscode on Windows. However, for projects involving tasks, I set my default shell to Git Bash to be able to write cross-platform compatible Taskfiles.

Now, if I start a task via the extension, I believe it will execute the commands in CMD. I think this is quite problematic as a fixed default for Windows, since PowerShell has at least some command aliases for typical Linux-style commands.

Thus, I would suggest two changes:

  1. Have the extension respect the default terminal profile.
  2. Have an option to choose a specific shell.

For anyone having the same problem, as a workaround, I'm currently using the option "outputTo": "terminal".

How to reproduce:

version: '3'

tasks:
  ls:
    cmds:
      - ls

With the above Taskfile, if I run the task ls from the extension and have "outputTo": "output", I get the following output:

task: [ls] ls
"ls": executable file not found in $PATH
task: Failed to run task "ls": exit status 127
task: Failed to run task "ls": exit status 127
task: completed with code 201

However, if I set "outputTo": "terminal" and last used Git Bash, running the task ls from the extension, I get the expected output:

$ task ls
task: [ls] ls
Taskfile.yml
@pd93 pd93 added state: needs triage Waiting to be triaged by a maintainer. os: windows Issues that affect users on Windows. labels Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os: windows Issues that affect users on Windows. state: needs triage Waiting to be triaged by a maintainer.
Projects
None yet
Development

No branches or pull requests

2 participants