Fix handling of empty json diff

[?]
Dec 24, 2020, 3:26 AM
QGP57DI2OGYA3C7T3AURM5XHPMTI2DA5TMLRLB3AEUVTHDESG7YAC

Dependencies

  • [2] YUVLBWV3 Populate resource groups for unrecorded and untracked changes
  • [3] ZGMIJNFV Create pijul.ts for executing commands using the Pijul CLI

Change contents

  • edit in src/pijul.ts at line 207
    [2.2772][2.2772:2879]()
    const pijulDiff = JSON.parse((await this.pijul.exec(this.repositoryRoot, ['diff', '--json'])).stdout);
  • replacement in src/pijul.ts at line 208
    [2.2915][2.2915:3001]()
    for (const file in pijulDiff) {
    changedFiles.push(createResourceUri(file));
    [2.2915]
    [2.3001]
    const output = (await this.pijul.exec(this.repositoryRoot, ['diff', '--json'])).stdout;
    if (output !== '') {
    const pijulDiff = JSON.parse(output);
    for (const file in pijulDiff) {
    changedFiles.push(createResourceUri(file));
    }