Skip to content

Commit e9b5639

Browse files
committed
Added remote platform config cleanup
1 parent b244e7d commit e9b5639

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

flutter_workspace.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#
3030

3131
import argparse
32+
import glob
3233
import io
3334
import json
3435
import os
@@ -249,6 +250,14 @@ def main():
249250
#
250251
# Load Remote Platforms
251252
#
253+
254+
# First, clear linked platforms
255+
configs_dir = os.path.join(os.getcwd(), 'configs')
256+
if os.path.exists(configs_dir):
257+
for filename in sorted(glob.glob(os.path.join(configs_dir, 'remote_*.json'))):
258+
print(f'Unlinking remote config file: {filename}')
259+
os.unlink(filename)
260+
# Setup remote platform
252261
app_folder = os.path.join(workspace, 'app')
253262
if args.remote:
254263
# comma-separated list of git repos

0 commit comments

Comments
 (0)