Add auto editor version search.#43
Merged
MakovWait merged 3 commits intoMakovWait:mainfrom Oct 21, 2023
Merged
Conversation
MakovWait
reviewed
Oct 20, 2023
src/cli/open_editor/open_editor.gd
Outdated
| var editor: LocalEditors.Item = null | ||
|
|
||
| if req.name_pattern.is_empty(): | ||
| var project_path = DirAccess.open(req.working_dir).get_current_dir() + "/project.godot" |
Owner
There was a problem hiding this comment.
DirAccess.open(req.working_dir).get_current_dir().path_join("project.godot")
src/cli/open_editor/open_editor.gd
Outdated
| var result: LocalEditors.Item = null | ||
|
|
||
| if FileAccess.file_exists(project_path): | ||
| var project_info = Projects.ExternalProjectInfo.new(project_path) |
Owner
There was a problem hiding this comment.
we should also check if a project with the given project_path exists, and if it does - use the editor bound to it
46f9958 to
e6519be
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
New Argument for
godots editor runThe new argument serves as a hint to godots for determining which version of the Godot editor should be launched. This argument represents the path to the project's Godot directory. Initially, Godots will try to open the editor version already bound to the project. If unsuccessful, it will then source the desired version from the version_hint property in the project.godot file.
--nameflag is passed.version_hintdoes not exist in theproject.godotfile, the editor will not open.Usage
godots.exe editor run "path/to/project/dir"