()
| 45 | let running = false |
| 46 | |
| 47 | async function run() { |
| 48 | if (running) { |
| 49 | console.log('still running...') |
| 50 | return |
| 51 | } |
| 52 | running = true |
| 53 | try { |
| 54 | await $({ |
| 55 | stdio: 'inherit', |
| 56 | cwd: workshopRoot, |
| 57 | })`node ./epicshop/fix.js` |
| 58 | } catch (error) { |
| 59 | throw error |
| 60 | } finally { |
| 61 | running = false |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | console.log(`watching ${watchPath}`) |
| 66 |