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(config): regression - handle relative patterns with leading dot slash #21922

Merged

Conversation

dsherret
Copy link
Member

This is a hacky quick fix. We need to spend more time cleaning up this code and push more stuff down into deno_config.

Closes #21916

.with_context(|| format!("Failed to expand glob: \"{}\"", pattern))?;
let pattern = escape_brackets(pattern)
.replace('\\', "/")
.replace("/./", "/");
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be better to construct each time the absolute path from the relative path instead of building a relative path compliant pattern?
I do not know what is the exact expected usage of that glob expansion code but that does not look right to do path munging in code dedicated to glob handling.

Copy link
Member Author

@dsherret dsherret Jan 13, 2024

Choose a reason for hiding this comment

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

Yeah that's what's done in the real fix in #21925

It requires a much larger and riskier refactor to do that though (as seen there)

@dsherret dsherret merged commit daed588 into denoland:main Jan 13, 2024
14 checks passed
@dsherret dsherret deleted the fix_relative_pattern_leading_dot_slash branch January 13, 2024 15:39
dsherret added a commit that referenced this pull request Jan 13, 2024
…lash (#21922)

This is a hacky quick fix. We need to spend more time cleaning up this
code and push more stuff down into deno_config.

Closes #21916
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.

[Bug test] deno test: error: No test modules found
3 participants