fix: musn't delete files on test enviroment
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
2a41c1bb93
commit
5491fce0c6
|
@ -1,3 +1,4 @@
|
||||||
|
const UserError = require('vn-loopback/util/user-error');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
|
@ -26,6 +27,9 @@ module.exports = Self => {
|
||||||
myOptions.transaction = tx;
|
myOptions.transaction = tx;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (process.env.NODE_ENV == 'test')
|
||||||
|
throw new UserError(`Action not allowed on the test environment`);
|
||||||
|
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const DmsContainer = models.DmsContainer;
|
const DmsContainer = models.DmsContainer;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue