-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
$ ue4 setroot jndksfjnaskldjfnksda
Set engine root path override: /home/kornel/Projects/ue4cli/jndksfjnaskldjfnksda
Using user-specified engine root: /home/kornel/Projects/ue4cli/jndksfjnaskldjfnksda
Warning: the specified directory does not appear to contain a valid version of the Unreal Engine.
# return code 0
$ ue4 root
Using user-specified engine root: /home/kornel/Projects/ue4cli/jndksfjnaskldjfnksda
/home/kornel/Projects/ue4cli/jndksfjnaskldjfnksda
# return code 0This should not happen. Setting root override to a non-valid Engine directory should fail.
Currently it always saves the override no matter what, and only prints warning.
In #65 I already changed warning to error by throwing UnrealManagerException.
Now I need to also prevent the override from being saved.
This is a bit tricky to fix as currently we save the override first and then validate it afterwards:
ue4cli/ue4cli/UnrealManagerBase.py
Lines 39 to 54 in fed71c1
| def setEngineRootOverride(self, rootDir): | |
| """ | |
| Sets a user-specified directory as the root engine directory, overriding any auto-detection | |
| """ | |
| # Set the new root directory | |
| rootDir = os.path.abspath(rootDir) | |
| ConfigurationManager.setConfigKey('rootDirOverride', rootDir) | |
| print('Set engine root path override: {}'.format(rootDir)) | |
| # Check that the specified directory is valid and warn the user if it is not | |
| try: | |
| self.getEngineVersion() | |
| except: | |
| print('Warning: the specified directory does not appear to contain a valid version of the Unreal Engine.') | |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels