1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 15:53:55 +00:00

fix mac clipboard missing end 2 characters (#211)

This commit is contained in:
Simon Smith
2024-01-18 22:50:45 +00:00
committed by GitHub
parent 263bce96ec
commit c1b5ff3b23

View File

@@ -953,7 +953,7 @@ function macos_messageBox()
ret.child.on('exit', function ()
{
var res = this.stdout.str.split('\x1e')[1];
if (res.length > 2) { res = res.substring(0, res.length - 2); }
// if (res.length > 2) { res = res.substring(0, res.length - 2); }
this.promise._res(res);
});
ret.child.stdin.write('su - ' + ret.name + '\n');
@@ -1130,7 +1130,7 @@ function macos_messageBox()
}
else
{
if (this._shell.stdout.str.length > 2) { this._shell.stdout.str = this._shell.stdout.str.substring(0, this._shell.stdout.str.length - 2); }
// if (this._shell.stdout.str.length > 2) { this._shell.stdout.str = this._shell.stdout.str.substring(0, this._shell.stdout.str.length - 2); }
this.end(translateObject({ command: 'readClip', clipValue: this._shell.stdout.str }));
}
break;