Skip to content

Commit a627a2e

Browse files
committed
Added remote platform config cleanup
1 parent c89c983 commit a627a2e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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
@@ -247,6 +248,14 @@ def main():
247248
#
248249
# Load Remote Platforms
249250
#
251+
252+
# First, clear linked platforms
253+
configs_dir = os.path.join(os.getcwd(), 'configs')
254+
if os.path.exists(configs_dir):
255+
for filename in sorted(glob.glob(os.path.join(configs_dir, 'remote_*.json'))):
256+
print(f'Unlinking remote config file: {filename}')
257+
os.unlink(filename)
258+
# Setup remote platform
250259
app_folder = os.path.join(workspace, 'app')
251260
if args.remote:
252261
# comma-separated list of git repos

0 commit comments

Comments
 (0)