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

feat!: throw an error when no file was found #127

Merged
merged 6 commits into from
Oct 9, 2024

Conversation

tassioFront
Copy link
Contributor

@tassioFront tassioFront commented Sep 25, 2024

reasons here

important points:

  • I tried to follow the same pattern error (which is treated directly on the function, that's why I passed silent to the copyAll). Another alternative I thought was to return an array of failed results and use outputCopyLog to show them, then I would not need to pass the silent flag.
  • I used silent as it looks for this purpose. I don't think make sense to create another flag

Evidence:

build

silent=false
silente=false

silent=true
on-silent=true

server

silent=false
server-silente=false

silent=true (the server keeps running, but there is a logger.error)
server-error

Copy link

changeset-bot bot commented Sep 25, 2024

🦋 Changeset detected

Latest commit: a3faaf9

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

src/serve.ts Outdated
)
updateFileMapFromTargets(copyTargets, fileMap)
} catch (e) {
config.logger.error(formatConsole(pc.red((e as Error).toString())))
!silent &&
Copy link
Contributor Author

@tassioFront tassioFront Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like it was missed. All logs here are silenceable

@tassioFront tassioFront marked this pull request as ready for review September 25, 2024 14:04
@tassioFront tassioFront changed the title feat: throw error on does not find file feat: throw error when does not find file Sep 25, 2024
@tassioFront
Copy link
Contributor Author

@sapphi-red, any news here? 😅

@sapphi-red sapphi-red added the enhancement New feature or request label Oct 9, 2024
@sapphi-red sapphi-red linked an issue Oct 9, 2024 that may be closed by this pull request
Copy link
Owner

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sapphi-red sapphi-red changed the title feat: throw error when does not find file feat: throw an error when no file was found Oct 9, 2024
@sapphi-red sapphi-red merged commit 21304df into sapphi-red:main Oct 9, 2024
8 checks passed
@sapphi-red sapphi-red changed the title feat: throw an error when no file was found feat!: throw an error when no file was found Oct 9, 2024
@github-actions github-actions bot mentioned this pull request Oct 9, 2024
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

Successfully merging this pull request may close these issues.

[suggestion] throws an error when it doesn't find the file/path
2 participants