MCPcopy Create free account
hub / github.com/HKUDS/AgentSpace / execFileText

Function execFileText

apps/web/features/integrations/google-workspace-cli.ts:891–915  ·  view source on GitHub ↗
(
  runner: ExecFileLike,
  file: string,
  args: string[],
  options: {
    env: NodeJS.ProcessEnv;
    timeout: number;
    maxBuffer: number;
    windowsHide: boolean;
  },
)

Source from the content-addressed store, hash-verified

889}
890
891function execFileText(
892 runner: ExecFileLike,
893 file: string,
894 args: string[],
895 options: {
896 env: NodeJS.ProcessEnv;
897 timeout: number;
898 maxBuffer: number;
899 windowsHide: boolean;
900 },
901): Promise<string> {
902 return new Promise((resolve, reject) => {
903 runner(file, args, options, (error, stdout, stderr) => {
904 if (error) {
905 Object.assign(error, {
906 stdout: stdout.toString(),
907 stderr: stderr.toString(),
908 });
909 reject(error);
910 return;
911 }
912 resolve(stdout.toString());
913 });
914 });
915}
916
917function normalizeGoogleWorkspaceCliExecutionError(
918 error: unknown,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected