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

Throw if file not found #234

Open
Amatewasu opened this issue Jun 20, 2023 · 1 comment
Open

Throw if file not found #234

Amatewasu opened this issue Jun 20, 2023 · 1 comment
Labels
bug Something isn't working pr requested

Comments

@Amatewasu
Copy link

Amatewasu commented Jun 20, 2023

Currently, if we run ts-auto-guard my-file.ts and my-file.ts is not found, ts-auto-guard outputs Done!.

It would be nice to display that the file has not been found.

@rhys-vdw
Copy link
Owner

@Amatewasu good idea. Would you like to open a PR? I'm sure it would be a simple fix.

Looks like it once already worked:

if (error instanceof FileNotFoundError) {

In any case, you'll probably need to loop through the files and throw here:

project.addSourceFilesAtPaths(paths)

@rhys-vdw rhys-vdw added bug Something isn't working pr requested labels Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pr requested
Projects
None yet
Development

No branches or pull requests

2 participants