Skip to content

Commit

Permalink
Fix yarn chrome-open to run in Windows (OctoLinker#508)
Browse files Browse the repository at this point in the history
Fixes OctoLinker#507, unsure if you want to keep these *-open around, but in Windows the relative dir is not resolved.

### Checklist:

- [ ] If this PR is a new feature, please provide at least one example link
- [ ] Make sure all of the significant new logic is covered by tests
  • Loading branch information
leomoty authored and stefanbuck committed Aug 29, 2018
1 parent 7daf942 commit 3da6100
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/chrome-launch.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/env node

const chromeLaunch = require('chrome-launch'); // eslint-disable-line import/no-extraneous-dependencies
const path = require('path');

const url = 'https://github.com/OctoLinker/OctoLinker/blob/master/package.json';
const args = ['--load-extension=./dist'];
const dist = path.resolve(__dirname, '..', 'dist');
const args = [`--load-extension=${dist}`];

chromeLaunch(url, { args });
console.log('A new instance of Chrome should now be open in the background.'); // eslint-disable-line no-console

0 comments on commit 3da6100

Please sign in to comment.