From dd539273fbf31c249ef8289ece2fb675367bb5c5 Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Wed, 4 May 2022 02:24:47 +0200 Subject: [PATCH] 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 --- lib/migrations/20200321153000-fix-account-deletion.js | 2 +- public/docs/release-notes.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/migrations/20200321153000-fix-account-deletion.js b/lib/migrations/20200321153000-fix-account-deletion.js index 3b5a4224a..6e51f04cf 100644 --- a/lib/migrations/20200321153000-fix-account-deletion.js +++ b/lib/migrations/20200321153000-fix-account-deletion.js @@ -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') } diff --git a/public/docs/release-notes.md b/public/docs/release-notes.md index 1ee59dae7..b2aa64d8a 100644 --- a/public/docs/release-notes.md +++ b/public/docs/release-notes.md @@ -2,6 +2,9 @@ ## 1.x.x UNRELEASED +### Enhancements +- Remove unexpected shell call during migrations + This release drops support for Node.js 12, as it has reached end-of-life.