From 2015435edda55dbd94564eb85d154653c5643650 Mon Sep 17 00:00:00 2001 From: Struan McDonough Date: Wed, 21 Sep 2022 14:21:46 +0100 Subject: [PATCH] Add an optional enabled field to allow sync rules to be disabled conditionally --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index c304397..2df1a0d 100644 --- a/index.js +++ b/index.js @@ -138,6 +138,9 @@ class ServerlessS3Sync { if (s.hasOwnProperty('acl')) { acl = s.acl; } + if (s.hasOwnProperty('enabled') && s.enabled === false) { + return; + } let followSymlinks = false; if (s.hasOwnProperty('followSymlinks')) { followSymlinks = s.followSymlinks;