Skip to content

Commit abdecb7

Browse files
committed
parse env
1 parent ae8abdb commit abdecb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

watch.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ const dir = './src'
99
const delay = 500
1010

1111
function buildCommand () {
12-
const tasks = process.env.GIPOD_TASKS
12+
const tasks = JSON.parse(process.env.GIPOD_TASKS)
1313
const port = tasks ? tasks[0]?.env?.PORT || 8080 : 80
1414
const switchPort = tasks ? tasks[1]?.env?.PORT || 8888 : 8888
15-
return `./watch.sh ${port} ${switchPort}\n`
15+
return `./watch.sh ${port} ${switchPort}`
1616
}
1717

1818
/**

0 commit comments

Comments
 (0)