Closed vepasto closed 9 years ago
WebHosting settings will not be overwritten by default, because allowWebHostingOverWrite
is set false
by default
DEFAULTS:
allowWebHostingOverWrite: false
if ((err && err.name === 'NoSuchWebsiteConfiguration') || opts.allowWebHostingOverWrite)
I'm using this overwrite in my current application and I don't see any harm this could cause.
Sorry I should have clarified, instead of this PR can we have no option, and when enableWeb
is on - it's always overwritten?
Users may have changed options by S3 console and those changes will then be overwritten.
We could make that change if we add major version?
hmmm maybe instead well add this to the enableWeb
option:
false
) offtrue
) on - no overwrite"force"
(the string "force"
) on - overwriteThis just saves adding another option for something that maybe not many will use, sound ok?
currently my enableWeb
is an object containing custom settings:
enableWeb: {
<my-own-settings-here>
}
so "force"
wont allow this
Your enableWeb ? An object would also work, falsy, truthy and object with "sub-settings" (which would also be truthy). Then inside there you could an overwrite
option?
This object is directly sent to aws s3, so I would not pollute it with own properties.
We could add there some kind of prefix to make sure we are not accidentally using S3
properties
Ah I see, an object is already used, sorry missed that. I think a prefixed property would be fine, like grunt-overwrite
.
Yees! I'll do that!
@jpillora, please check new commit
Sorry about pushing incomplete code! But now it works!
thanks @vepasto sorry for the delay
Currently it seems that websites enabled if they dont exist
Will overwriting by default cause any harm?