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

Does not return nonzero exit code when failed to read a tsconfig #41

Closed
dimikot opened this issue Oct 4, 2024 · 2 comments
Closed

Does not return nonzero exit code when failed to read a tsconfig #41

dimikot opened this issue Oct 4, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@dimikot
Copy link

dimikot commented Oct 4, 2024

Here:

console.error(`could not read ${tsconfigFilePath}`, error);

The exception is logged, but not rethrown. So the process exit successfully, which means that it's hard to use the tool in e.g. postinstall scripts or in CI.

In the example below, I manually deleted ./tsconfig.json and ran the tool as update-ts-references && echo ok - it printed "ok".

CleanShot 2024-10-04 at 00 39 56@2x

@MKruschke MKruschke added the enhancement New feature or request label Oct 4, 2024
@MKruschke
Copy link
Member

Hi @dimikot,
if you or your teammates deleting the tsconfig.json from the root then I think my tool should be the least problem for you. Because your ts check isn't working anymore 😄

Anyway nice catch for improvement! I will add that check for the root tsconfig 👍🏻

Have a nice weekend 👋🏻

@MKruschke
Copy link
Member

Hi @dimikot,
I decided to introduce a strict mode by adding the option --strict as command argument. Please us that from now on if you expect to have in every package as well in the root a tsconfig.json to be present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants