Skip to content

Commit a0c4350

Browse files
committed
Added double quotes to prevent issues with windows paths.
1 parent 736e8cc commit a0c4350

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ function prinTesTicket(printerName) {
121121
function prinTicket(printerName) {
122122
var printCmd = "lp -d " + printerName + " pos.txt";
123123
if(os.platform() == 'win32') {
124-
var fullPath = app.getAppPath() + "\\";
125-
printCmd = fullPath + 'RawPrint.exe "' + printerName + '" ' + fullPath + 'pos.txt';
124+
var fullPath = '"' + app.getAppPath() + "\\";
125+
printCmd = fullPath + 'RawPrint.exe" "' + printerName + '" pos.txt';
126126
}
127127

128128
exec(printCmd, (error, stdout, stderr) => {

0 commit comments

Comments
 (0)