chore: add more comments

This commit is contained in:
Simon Chan 2024-05-17 21:55:37 +08:00
parent c720a25cf0
commit 8f9b855763
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
2 changed files with 38 additions and 10 deletions

View file

@ -41,6 +41,18 @@ export class Cmd extends AdbCommandBase {
this.#supportsAbbExec = adb.canUseFeature(AdbFeature.AbbExec);
}
/**
* Spawn a new `cmd` command. It will use ADB's `abb` command if available.
*
* @param shellProtocol
* Whether to use shell protocol. If `true`, `stdout` and `stderr` will be separated.
*
* `cmd` doesn't use PTY, so even when shell protocol is used,
* resizing terminal size and closing `stdin` are not supported.
* @param command The command to run.
* @param args The arguments to pass to the command.
* @returns An `AdbSubprocessProtocol` that provides output streams.
*/
async spawn(
shellProtocol: boolean,
command: string,