Skip to content

Commit 5ba09aa

Browse files
committed
Fix command builder for OS Windows.
1 parent 0aa04f3 commit 5ba09aa

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

image.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -672,9 +672,15 @@ Image.prototype.command = function(key, value, priority, esc) {
672672

673673
function wrap(command, empty) {
674674
var cmd = '';
675-
for (var i = 0, length = command.length; i < length; i++)
676-
cmd += command[i] === '\'' ? '"' : command[i];
677-
return (empty ? ' ' : '') + '\'' + cmd + '\'';
675+
if (framework.isWindows) {
676+
for (var i = 0, length = command.length; i < length; i++)
677+
cmd += command[i] === '\"' ? '\'' : command[i];
678+
return (empty ? ' ' : '') + '"' + cmd + '"';
679+
} else {
680+
for (var i = 0, length = command.length; i < length; i++)
681+
cmd += command[i] === '\'' ? '"' : command[i];
682+
return (empty ? ' ' : '') + '\'' + cmd + '\'';
683+
}
678684
}
679685

680686
exports.Image = Image;

0 commit comments

Comments
 (0)