Uploaded image for project: 'Enyo'
  1. ENYO-4017

deploy.js should error if deploy.json contains invalid JSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects versions: 2.4.0
    • Fix versions: None
    • Components: enyo
    • Labels:
    • Environment:

      All

    • Sprint:

      Description

      From: http://forums.enyojs.com/discussion/2066/why-are-errors-parsing-finding-deploy-json-silenced?

      Today I tried to run the deploy script for one of our apps, and I failed to get things working even though the deploy script didn't throw any errors.

      Turns out I had a syntax error in my deploy.json file, but enyo's deploy.js file specifically catches the error and silently puts a default manifest in place instead.

      I would think it'd be better for any deployment script is to fail early rather than to fail silently. Is there a particular/good reason to fail silently?

      Response:

      Hey Ruben – looks like poor error handling to me. I'm guessing the code in the catch (that creates the default manifest) was intended for the case where a library didn't specify a deploy.json, which we do not intend to be compulsory (the readFileSync would throw an error on non-existent file), in which case we use the default. However, in the case a deploy.json DOES exist and the JSON doesn't parse correctly, I agree we should definitely error out with a message so the user knows their JSON is bad. Should be a simple fix.

        Attachments

          Activity

            People

            • Assignee:
              kevinpschaaf Kevin Schaaf (Enyo Team)
              Reporter:
              kevinpschaaf Kevin Schaaf (Enyo Team)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: