Skip to content

"tsc watch" task broken for projects with references #66875

@RomainMuller

Description

@RomainMuller
  • VSCode Version: 1.30.2
  • OS Version: macOS X 10.13.6 (17G4015)

Steps to Reproduce:

  1. Open a package with references in the tsconfig.json file
  2. Attempt to execute the tsc : watch - tsconfig.json build task
  3. Behold the tsc error (pardon my french):
    > Executing task: tsc --watch -b /Repro/tsconfig.json <
    
    error TS6369: Option '--build' must be the first command line argument.
    Le processus du terminal s'est achevé avec le code de sortie 1
    
    Le terminal sera réutilisé par les tâches, appuyez sur une touche pour le fermer.
    

Does this issue occur when all extensions are disabled?: Yes


The issue appears to be caused by the -b being added at tasks.ts:221 and --watch being prepended to that value at tasks.ts:200, resulting in an invalid invocation of tsc. A possible solution might be to append --watch at the end instead of prepending.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugtasksTask system issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions