Skip to content

Commit

Permalink
fix(win32): commands in electron asar archive
Browse files Browse the repository at this point in the history
  • Loading branch information
radar155 authored and bencevans committed Jan 15, 2019
1 parent 8540052 commit 68eee48
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/win32/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ function windowsSnapshot (options = {}) {

const displayChoice = displayName ? ` /d "${displayName}"` : ''

exec('"' + path.join(__dirname, 'screenCapture_1.3.2.bat') + '" "' + imgPath + '" ' + displayChoice, {
cwd: __dirname
exec('"' + path.join(__dirname.replace('app.asar', 'app.asar.unpacked'), 'screenCapture_1.3.2.bat') + '" "' + imgPath + '" ' + displayChoice, {
cwd: __dirname.replace('app.asar', 'app.asar.unpacked')
}, (err, stdout) => {
if (err) {
return reject(err)
Expand Down Expand Up @@ -67,8 +67,8 @@ function parseDisplaysOutput (output) {
function listDisplays () {
return new Promise((resolve, reject) => {
exec(
'"' + path.join(__dirname, 'screenCapture_1.3.2.bat') + '" /list', {
cwd: __dirname
'"' + path.join(__dirname.replace('app.asar', 'app.asar.unpacked'), 'screenCapture_1.3.2.bat') + '" /list', {
cwd: __dirname.replace('app.asar', 'app.asar.unpacked')
},
(err, stdout) => {
if (err) {
Expand Down

0 comments on commit 68eee48

Please sign in to comment.