Skip to content

Commit 076df7a

Browse files
Fix sync pull command
1 parent fd03c13 commit 076df7a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cloudinary_cli/modules/sync.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,6 @@ def pull(self):
145145
logger.info("Aborting...")
146146
return False
147147

148-
if not (self.force or confirm_action(
149-
f"Running this command will delete {len(self.unique_local_file_names)} local files. "
150-
f"Continue? (y/N)")):
151-
return False
152-
153148
files_to_pull = self.unique_remote_file_names | self.out_of_sync_file_names
154149

155150
logger.info(f"Downloading {len(files_to_pull)} files from Cloudinary")
@@ -166,7 +161,12 @@ def pull(self):
166161

167162
def _delete_unique_local_files(self):
168163
if not len(self.unique_local_file_names):
169-
return
164+
return True
165+
166+
if not (self.force or confirm_action(
167+
f"Running this command will delete {len(self.unique_local_file_names)} local files. "
168+
f"Continue? (y/N)")):
169+
return False
170170

171171
logger.info(f"Deleting {len(self.unique_local_file_names)} local files...")
172172
for file in self.unique_local_file_names:

0 commit comments

Comments
 (0)