Skip to content

fix(cli/run): resolve conflict when dir has same name as a task #29538

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

edilson258
Copy link
Contributor

Fixes: #28878

This PR fixes an issue where running deno run <name> would fail if a directory with the same name exists in the current working directory. This behavior is inconsistent with deno task, which correctly handles such cases by resolving the intended task path.

Please refer #28878 for a full description

@dsherret
Copy link
Member

Can you add a test to the tests/specs/run folder? To add a new test you just have to copy the same layout as the other folders then do cargo test <name_of_folder> to run the test

@edilson258 edilson258 force-pushed the fix/run-dirname-collision branch 2 times, most recently from a4549ff to ea196d8 Compare May 31, 2025 08:33
@edilson258
Copy link
Contributor Author

Can you add a test to the tests/specs/run folder? To add a new test you just have to copy the same layout as the other folders then do cargo test <name_of_folder> to run the test

Done

@edilson258 edilson258 force-pushed the fix/run-dirname-collision branch 2 times, most recently from fd42f4a to a800192 Compare June 2, 2025 07:50
@hansSchall
Copy link

I have tested it, LGTM

@edilson258 edilson258 force-pushed the fix/run-dirname-collision branch from a800192 to 34c58aa Compare June 3, 2025 13:57
@edilson258
Copy link
Contributor Author

@dsherret is there something else that we can do to get this merged??

@edilson258 edilson258 force-pushed the fix/run-dirname-collision branch from 34c58aa to 1d4085c Compare June 21, 2025 05:42
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.

Using deno run instead of deno task fails if there is a dir with the same name as the task
3 participants