Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a "hang" when
tsconfig.json
is not present in the CWD
If a `tsconfig.json` file is not present at the root of the Pulumi project, ts-node will look up the directory tree to see if there is one. If there is, it will treat that as the root of the project. While reasonable for some cases, this isn't the behavior we want for our use of ts-node. We actually set compiler options such that in the common case you don't even need a `tsconfig.json` and for pure JavaScript projects, there wouldn't be a `tsconfig.json` file. In both of these cases, there's a big foot-gun waiting. For example in #1772 we ran into a case where there was a tsconfig.json file in $HOME, causing the entirety of $HOME to be analyzed by TypeScript which made it look like Pulumi hung. To address this, tell ts-node to not use a project in cases where there is not a `tsconfig.json` at the root of the project. Fixes #1772
- Loading branch information