fix(migrations): Remove unexpected shell call
This patch removes the call of `/usr/bin/env` when calling the migration script in favour of using the processes own nodejs invocation path. This should drop the requirement for `/usr/bin/env` to exist on a system/in a container that runs hedgedoc. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
@@ -3,7 +3,7 @@ const { spawnSync } = require('child_process')
|
||||
const path = require('path')
|
||||
module.exports = {
|
||||
up: function (queryInterface, Sequelize) {
|
||||
const cleanup = spawnSync('./bin/cleanup', { cwd: path.resolve(__dirname, '../../') })
|
||||
const cleanup = spawnSync(process.argv[0], ['./bin/cleanup'], { cwd: path.resolve(__dirname, '../../') })
|
||||
if (cleanup.status !== 0) {
|
||||
throw new Error('Unable to cleanup')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user