Add sanity checks to plugin watcher
This commit is contained in:
parent
c561156670
commit
2d5d22c914
|
@ -151,6 +151,10 @@ module.exports = server.listen(env.PORT || 0, async () => {
|
||||||
awaitWriteFinish: true,
|
awaitWriteFinish: true,
|
||||||
})
|
})
|
||||||
.on("all", async (event: string, path: string) => {
|
.on("all", async (event: string, path: string) => {
|
||||||
|
// Sanity checks
|
||||||
|
if (!path?.endsWith(".tar.gz") || !fs.existsSync(path)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
await tenancy.doInTenant(DEFAULT_TENANT_ID, async () => {
|
await tenancy.doInTenant(DEFAULT_TENANT_ID, async () => {
|
||||||
try {
|
try {
|
||||||
const split = path.split("/")
|
const split = path.split("/")
|
||||||
|
|
Loading…
Reference in New Issue