Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Fails silently if (.)oclif.manifest.json is missing #178

Open
olafure opened this issue Sep 30, 2020 · 0 comments
Open

Fails silently if (.)oclif.manifest.json is missing #178

olafure opened this issue Sep 30, 2020 · 0 comments

Comments

@olafure
Copy link

olafure commented Sep 30, 2020

There is a bug in src/plugin.ts:readManifest()
If both oclif.manifest.json and .oclif.manifest.json are missing, the exception is caught and mistakenly silenced.

The nesting level of the this.warn line might be wrong. No warning is issued if the .oclif.manifest.json is missing too.

Possible fix?
if (!dotfile) return readManifest(true) else this.warn(error, 'readManifest').

      } catch (error) {
        if (error.code === 'ENOENT') { // both exceptions are caught here
          if (!dotfile) return readManifest(true) // PROBLEM IS HERE
        } else {
          this.warn(error, 'readManifest')
        }
      }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant