Skip to content

Commit

Permalink
Set environment variable before use it
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoVictor committed Jun 19, 2024
1 parent 78cedb9 commit dba4095
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/migrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ module.exports.handler = async () => {

const DATABASE_URL = `postgresql://${username}:${password}@${process.env.CLUSTER_URL}/coderunner?schema=public`;
const { output, error } = spawnSync(
"./node_modules/.bin/prisma migrate deploy",
{
shell: true,
env: {
DATABASE_URL,
},
}
`DATABASE_URL="${DATABASE_URL}"./node_modules/.bin/prisma migrate deploy`,
{ shell: true }
);

if (error) {
Expand Down

0 comments on commit dba4095

Please sign in to comment.