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(compile): never include the specified output executable in itself #27877

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HasanAlrimawi
Copy link
Contributor

closes #27796

Change
Check if the output executable file is within the included files to be compiled, and remove it if so.

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

Thanks! See comment though.

let file_index = include_files.iter().position(|file_included| {
file_included
.path()
.ends_with(output_path.to_str().unwrap().replace(" ", "%20").as_str())
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this will work on windows. It should probably be converted to a url first. Can you add a test for this change?

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.

Deno compile should never include the specified output executable in itself
2 participants