tools: handle paths in vcreate more gracefully #19870
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
馃 Generated by Copilot at d36c787
This pull request improves the cross-platform compatibility of the
vcreate
tool by using theos
module for path manipulation. It refactors the code for creating different types of projects (library, web, and binary) and uses theos.join_path
andos.dir
functions instead of string interpolation or manual splitting and joining of path components. This makes the code more portable, reliable, and readable.馃 Generated by Copilot at d36c787
os
module and usedos.join_path
function to join path components in a cross-platform way (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)os.dir
function to get the directory of the file path instead of manual splitting and joining invcreate.v
(link)