Skip to content

Commit a017517

Browse files
committed
fix: script paths not working with absolute paths
1 parent beeff0f commit a017517

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ const startServer = () => {
4141
const serviceName = path.parse(file).name;
4242
// biome-ignore lint/style/noNonNullAssertion: Asserted above
4343
const scriptPath = path.join(CONFIG.script_path!, file);
44-
const absoluteScriptPath = path.join(process.cwd(), scriptPath);
44+
const absoluteScriptPath = CONFIG.script_path?.startsWith("/")
45+
? scriptPath
46+
: path.join(process.cwd(), scriptPath);
4547

4648
app.get(`/${serviceName}`, async (req, res) => {
4749
const logger = new Logger({

0 commit comments

Comments
 (0)