Skip to content

Commit f507341

Browse files
author
Akos Kitta
committed
fix: ignore arduino.cloud.push.warn when creating a cloud copy
Signed-off-by: Akos Kitta <[email protected]>
1 parent e91ba86 commit f507341

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Diff for: arduino-ide-extension/src/browser/contributions/create-cloud-copy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export class CreateCloudCopy extends CloudSketchContribution {
9595
);
9696

9797
progress.report({ message: pushingSketch(newSketch.name) });
98-
await treeModel.sketchbookTree().push(newNode, true);
98+
await treeModel.sketchbookTree().push(newNode, true, true);
9999
};
100100
return this.commandService.executeCommand(
101101
NewCloudSketch.Commands.NEW_CLOUD_SKETCH.id,

Diff for: arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ export class CloudSketchbookTree extends SketchbookTree {
174174

175175
async push(
176176
node: CloudSketchbookTree.CloudSketchDirNode,
177-
noProgress = false
177+
noProgress = false,
178+
ignorePushWarnings = false
178179
): Promise<void> {
179180
if (!CloudSketchbookTree.CloudSketchTreeNode.isSynced(node)) {
180181
throw new Error(
@@ -190,7 +191,8 @@ export class CloudSketchbookTree extends SketchbookTree {
190191
return;
191192
}
192193

193-
const warn = this.arduinoPreferences['arduino.cloud.push.warn'];
194+
const warn =
195+
!ignorePushWarnings && this.arduinoPreferences['arduino.cloud.push.warn'];
194196

195197
if (warn) {
196198
const ok = await new DoNotAskAgainConfirmDialog({

0 commit comments

Comments
 (0)