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

fix: check if output parameter is located inside root #896

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

martyanovandrey
Copy link
Contributor

No description provided.


if (!writePath.startsWith(writeBasePath)) {
throw new UnarchiveIncluderError(
`Invalid output parameter: ${output}. Provide includer with output parameter, which is located inside the documentation`,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd say this error message is a bit confusing.
Maybe something along the lines of Expected the unarchive destination to be located inside project root, got: ${output}?

Copy link
Contributor

Choose a reason for hiding this comment

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

agree

Copy link
Contributor

@main-kun main-kun left a comment

Choose a reason for hiding this comment

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

Agree with what @brotheroftux suggested, error message could be better


if (!writePath.startsWith(writeBasePath)) {
throw new UnarchiveIncluderError(
`Invalid output parameter: ${output}. Provide includer with output parameter, which is located inside the documentation`,
Copy link
Contributor

Choose a reason for hiding this comment

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

agree

@martyanovandrey martyanovandrey merged commit 69296e7 into master Nov 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants