Skip to content

Commit

Permalink
working npx execution
Browse files Browse the repository at this point in the history
  • Loading branch information
toddtarsi committed Dec 25, 2023
1 parent 98ddeb5 commit 770a090
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions packages/selenium-ide/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ const fs = require('fs/promises')

async function installElectron() {
// Read package.json
const packageJson = JSON.parse(await fs.readFile('package.json', 'utf8'))
const packageJson = JSON.parse(
await fs.readFile(join(__dirname, 'package.json'), 'utf8')
)
// Get the Electron version from package.json
const electronVersion = packageJson.devDependencies.electron

// Install Electron
console.log(`Installing Electron ${electronVersion}...`)
execSync(`npm i electron@${electronVersion}`, { stdio: 'inherit' })
execSync(`npm i electron@${electronVersion}`, {
cwd: __dirname,
stdio: 'inherit',
})
console.log('Electron installed successfully.')
}

Expand Down
2 changes: 1 addition & 1 deletion packages/selenium-ide/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "selenium-ide",
"version": "4.0.1-alpha.67",
"version": "4.0.1-alpha.68",
"private": false,
"description": "Selenium IDE electron app",
"author": "Todd <[email protected]>",
Expand Down

0 comments on commit 770a090

Please sign in to comment.