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

SGGMI: initialize directories before doing scope check #2

Open
wants to merge 1 commit into
base: beta
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions SGGMI.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,6 @@ def on_error(func, path, exc_info):
alt_print("Finished uninstalling mod edits.", config=config)
alt_exit(0, config=config)

config.edit_cache_dir.mkdir(parents=True, exist_ok=True)
config.base_cache_dir.mkdir(parents=True, exist_ok=True)
config.mods_dir.mkdir(parents=True, exist_ok=True)
config.deploy_dir.mkdir(parents=True, exist_ok=True)

alt_print("\nReading mod files...", config=config)
for mod in config.mods_dir.iterdir():
modfile.load(mod / config.mod_file, filemods=filemods, todeploy=todeploy, config=config)
Expand Down Expand Up @@ -264,7 +259,11 @@ def main_action(config):
parsed_args = parser.parse_args()
config.apply_command_line_arguments(parsed_args)

print( { x:y for x,y in config.__dict__.items() if x[0] != '_' } )
# Initialize directories if they don't exist
config.edit_cache_dir.mkdir(parents=True, exist_ok=True)
config.base_cache_dir.mkdir(parents=True, exist_ok=True)
config.mods_dir.mkdir(parents=True, exist_ok=True)
config.deploy_dir.mkdir(parents=True, exist_ok=True)

scopes_okay = util.check_scopes(config)
if not scopes_okay:
Expand Down