toolrunner.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /// <reference types="node" />
  2. import * as events from 'events';
  3. import * as im from './interfaces';
  4. export declare class ToolRunner extends events.EventEmitter {
  5. constructor(toolPath: string, args?: string[], options?: im.ExecOptions);
  6. private toolPath;
  7. private args;
  8. private options;
  9. private _debug;
  10. private _getCommandString;
  11. private _processLineBuffer;
  12. private _getSpawnFileName;
  13. private _getSpawnArgs;
  14. private _endsWith;
  15. private _isCmdFile;
  16. private _windowsQuoteCmdArg;
  17. private _uvQuoteCmdArg;
  18. private _cloneExecOptions;
  19. private _getSpawnOptions;
  20. /**
  21. * Exec a tool.
  22. * Output will be streamed to the live console.
  23. * Returns promise with return code
  24. *
  25. * @param tool path to tool to exec
  26. * @param options optional exec options. See ExecOptions
  27. * @returns number
  28. */
  29. exec(): Promise<number>;
  30. }
  31. /**
  32. * Convert an arg string to an array of args. Handles escaping
  33. *
  34. * @param argString string of arguments
  35. * @returns string[] array of arguments
  36. */
  37. export declare function argStringToArray(argString: string): string[];