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

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

@olafure

Description

@olafure

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')
        }
      }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions