mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Check if the checkout has been --clone'd yet
As requested in SR-6312 a simple diagnostic to catch the error of not passing --clone the first time you run update-checkout. Checks whether there is just one directory (i.e. the swift/ directory) in SWIFT_SOURCE_ROOT and prints a message.
This commit is contained in:
@@ -479,6 +479,10 @@ By default, updates your checkouts of Swift, SourceKit, LLDB, and SwiftPM.""")
|
||||
skip_history,
|
||||
skip_repo_list)
|
||||
|
||||
if len([p for p in os.listdir(SWIFT_SOURCE_ROOT) if os.path.isdir(p)]) == 1:
|
||||
# If there's only one folder in the root directory, it means they still have to clone all the other projects.
|
||||
print("You only have the /swift directory. You may want to call this script with --clone to get the rest.")
|
||||
|
||||
update_results = update_all_repositories(args, config, scheme,
|
||||
cross_repos_pr)
|
||||
fail_count = 0
|
||||
|
||||
Reference in New Issue
Block a user