Skip to content

Commit

Permalink
fix: schedule path for bash was not workig on prod
Browse files Browse the repository at this point in the history
  • Loading branch information
wajeht committed Nov 11, 2023
1 parent d1ebef5 commit 126e27f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion dist/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env node
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = __importDefault(require("path"));
const db_1 = require("./database/db");
const commander_1 = require("commander");
const add_1 = require("./commands/add");
Expand Down Expand Up @@ -40,7 +44,7 @@ program
console.error('No configuration found');
return process.exit(1);
}
(0, child_process_1.spawn)(`./src/scripts/start.sh`, {
(0, child_process_1.spawn)(path_1.default.resolve(path_1.default.join(__dirname, '../..', 'src', 'scripts', 'start.sh')), {
shell: true,
stdio: 'inherit',
env: process.env,
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env node

import path from 'path';
import { db } from './database/db';
import { Command } from 'commander';
import { add } from './commands/add';
Expand Down Expand Up @@ -48,7 +49,7 @@ program
return process.exit(1);
}

spawn(`./src/scripts/start.sh`, {
spawn(path.resolve(path.join(__dirname, '../..', 'src', 'scripts', 'start.sh')), {
shell: true,
stdio: 'inherit',
env: process.env,
Expand Down

0 comments on commit 126e27f

Please sign in to comment.