diff --git a/packages/polydev/package.json b/packages/polydev/package.json index ff31046..bcc2734 100644 --- a/packages/polydev/package.json +++ b/packages/polydev/package.json @@ -1,6 +1,6 @@ { "name": "polydev", - "version": "1.4.0", + "version": "1.5.0", "bin": "./bin/polydev", "main": "./src/index.js", "repository": "git@github.com:ericclemmons/polydev.git", diff --git a/packages/polydev/src/middleware/notFound/index.js b/packages/polydev/src/middleware/notFound/index.js index 5cfa27c..9242756 100644 --- a/packages/polydev/src/middleware/notFound/index.js +++ b/packages/polydev/src/middleware/notFound/index.js @@ -1,3 +1,4 @@ +const { execSync } = require("child_process") const { stripIndent } = require("common-tags") const express = require("express") const jetpack = require("fs-jetpack") @@ -117,7 +118,7 @@ module.exports = express() await waitOn({ resources: [filepath] }, undefined) // Wait for the file to open - await opn(`vscode://file/${filepath}`, { wait: false }) + execSync(`code . -g ${filepath}`) // Reload the requested URL // ! Hopefully the router has been re-created by this point!