eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
20.04k stars 2.5k forks source link

Task runner not working with tcsh and csh shells #8164

Open danieltomasku opened 4 years ago

danieltomasku commented 4 years ago

Bug Description:

Launching a task while using tcsh or csh shells does not work and exits immediately. This is due to the startup flags being passed to it, -l and -c. According to the tcsh documentation, the -l flag is valid if it is the only flag being passed, so tcsh -l -c will not work.

Relevant code area; https://github.com/eclipse-theia/theia/blob/a1ea2307d50565944b42f74ba3797698697ec897/packages/task/src/node/process/process-task-runner.ts#L178-L197

Seems like a conditional block can be added to the above code snippet that matches on (t)csh and then only passes -c.

Steps to Reproduce:

  1. If you have tcsh available, set the THEIA_SHELL env variable to your tcsh location, e.g. export THEIA_SHELL=/bin/tcsh
  2. Run Theia
  3. Create a task in tasks.json of type shell.
  4. Try running that task and confirm it exits immediately with code 1

Additional Information

akosyakov commented 4 years ago

@marechal-p a bug?

paul-marechal commented 4 years ago

@akosyakov just an unsupported shell. @danieltomasku is your shell supported when running tasks with VS Code?

danieltomasku commented 4 years ago

@marechal-p yes, the tcsh shell is supported when running tasks with VS Code: image