Skip to content

Commit

Permalink
fix: ignore arduino.cloud.push.warn when creating a cloud copy
Browse files Browse the repository at this point in the history
Signed-off-by: Akos Kitta <[email protected]>
  • Loading branch information
Akos Kitta committed Mar 10, 2023
1 parent e91ba86 commit f507341
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class CreateCloudCopy extends CloudSketchContribution {
);

progress.report({ message: pushingSketch(newSketch.name) });
await treeModel.sketchbookTree().push(newNode, true);
await treeModel.sketchbookTree().push(newNode, true, true);
};
return this.commandService.executeCommand(
NewCloudSketch.Commands.NEW_CLOUD_SKETCH.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ export class CloudSketchbookTree extends SketchbookTree {

async push(
node: CloudSketchbookTree.CloudSketchDirNode,
noProgress = false
noProgress = false,
ignorePushWarnings = false
): Promise<void> {
if (!CloudSketchbookTree.CloudSketchTreeNode.isSynced(node)) {
throw new Error(
Expand All @@ -190,7 +191,8 @@ export class CloudSketchbookTree extends SketchbookTree {
return;
}

const warn = this.arduinoPreferences['arduino.cloud.push.warn'];
const warn =
!ignorePushWarnings && this.arduinoPreferences['arduino.cloud.push.warn'];

if (warn) {
const ok = await new DoNotAskAgainConfirmDialog({
Expand Down

0 comments on commit f507341

Please sign in to comment.