Skip to content

Commit a0fe803

Browse files
authored
fix unpredictable platform selection introduced in #292 (#307)
1 parent 072f94a commit a0fe803

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tldr.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@
5656
"osx": "osx",
5757
"sunos": "sunos",
5858
"win32": "windows",
59-
"windows": "windows",
60-
"common": "common",
59+
"windows": "windows"
6160
}
6261

6362

@@ -210,7 +209,7 @@ def get_platform() -> str:
210209

211210

212211
def get_platform_list() -> List[str]:
213-
platforms = list(set(OS_DIRECTORIES.values()))
212+
platforms = ['common'] + list(set(OS_DIRECTORIES.values()))
214213
current_platform = get_platform()
215214
platforms.remove(current_platform)
216215
platforms.insert(0, current_platform)
@@ -593,7 +592,7 @@ def create_parser() -> ArgumentParser:
593592
action='store_true',
594593
help="Delete the local cache of pages and exit")
595594

596-
all_platforms = sorted(set(OS_DIRECTORIES.values()))
595+
all_platforms = sorted(set(OS_DIRECTORIES.values())) + ['common']
597596
platforms_str = "[" + ", ".join(all_platforms) + "]"
598597

599598
parser.add_argument(

0 commit comments

Comments
 (0)