mirror of
https://github.com/coder/code-server.git
synced 2026-11-27 22:06:58 +08:00
Sometimes an exec has no callback
How lonely.
This commit is contained in:
1 parent
20f5d8eeed
commit
a0c443d8d3
1 file changed
+8
-6
@@ -32,12 +32,14 @@ export class CP {
|
||||
if (typeof options === "function") {
|
||||
callback = options;
|
||||
}
|
||||
// @ts-ignore not sure how to make this work.
|
||||
callback(
|
||||
error,
|
||||
useBuffer(options) ? Buffer.from(stdout) : stdout,
|
||||
useBuffer(options) ? Buffer.from(stderr) : stderr,
|
||||
);
|
||||
if (callback) {
|
||||
// @ts-ignore not sure how to make this work.
|
||||
callback(
|
||||
error,
|
||||
useBuffer(options) ? Buffer.from(stdout) : stdout,
|
||||
useBuffer(options) ? Buffer.from(stderr) : stderr,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// @ts-ignore TODO: not fully implemented
|
||||
|
||||
Reference in new issue
Block a user