Add logging of pijul CLI commands

[?]
Dec 24, 2020, 9:38 PM
HWRWO63P2LCLZLC7N63DIHOBVSFAKRDSYBGN3XYV5Q3MLIDJC6YAC

Dependencies

  • [2] B4SKYP3Y Add repository model and add steps to initialize it
  • [*] NCBEWRYE Initialize Repository
  • [*] WHFIIX4Y Improve documentation and add Pijul installation configuration

Change contents

  • edit in src/extension.ts at line 7
    [2.1742]
    [5.38]
    import { toDisposable } from './utils/disposableUtils';
  • edit in src/extension.ts at line 124
    [2.1957]
    [2.1957]
    // Setup logging
    const onOutput = (str: string): void => {
    const lines = str.split(/\r?\n/mg);
    while (/^\s*$/.test(lines[lines.length - 1])) {
    lines.pop();
    }
    outputChannel.appendLine(lines.join('\n'));
    };
    pijul.onOutput.addListener('log', onOutput);
    disposables.push(toDisposable(() => pijul.onOutput.removeListener('log', onOutput)));