From 9db54786f095bc8b6679df8453d1356cd017e8fc Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 29 Nov 2020 19:49:55 +0000 Subject: Removed unreliable find_examples() and will use list_profiles() instead, as it covers a wider range of profiles and search area. --- archinstall/lib/storage.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'archinstall/lib/storage.py') diff --git a/archinstall/lib/storage.py b/archinstall/lib/storage.py index 9ac1d51d..bb41c999 100644 --- a/archinstall/lib/storage.py +++ b/archinstall/lib/storage.py @@ -1,5 +1,15 @@ storage = {} -PROFILE_PATH = ['./profiles', '~/.config/archinstall/profiles', os.path.join(os.path.dirname(os.path.abspath(__file__)), 'profiles')] +# There's a few scenarios of execution: +# 1. In the git repository, where ./profiles/ exist +# 2. When executing from a remote directory, but targeted a script that starts from the git repository +# 3. When executing as a python -m archinstall module where profiles exist one step back for library reasons. +# (4. Added the ~/.config directory as a additional option for future reasons) +PROFILE_PATH = [ + './profiles', + '~/.config/archinstall/profiles', + os.path.join(os.path.dirname(os.path.abspath(__file__)), 'profiles'), + os.path.abspath(f'{os.path.dirname(__file__)}/../examples') +] UPSTREAM_URL = 'https://raw.githubusercontent.com/Torxed/archinstall/master/profiles' PROFILE_DB = None # Used in cases when listing profiles is desired, not mandatory for direct profile grabing. \ No newline at end of file -- cgit v1.2.3-70-g09d2