atlassian / nucleus

A configurable and versatile update server for all your Electron apps
Other
393 stars 91 forks source link

GPG Signing Error - Invalid left-hand side expression in prefix operation #140

Closed Si-Richards closed 2 years ago

Si-Richards commented 2 years ago

I've seen a few issues on this subject but im getting the following issue.

An error occurred while loading your config file

Please ensure it does not have syntax errors

/opt/service/config.js:179

-----BEGIN PGP PUBLIC KEY BLOCK-----

    ^^^^^^

ReferenceError: Invalid left-hand side expression in prefix operation

    at createScript (vm.js:80:10)

My config looks like

 /**
   * GPG key to use when signing APT and YUM releases
   *
   * Requires to be unlocked (no password) and have both the private and
   * public key.
   */
  gpgSigningKey: '
-----BEGIN PGP PUBLIC KEY BLOCK-----
xxxxxx
-----END PGP PUBLIC KEY BLOCK-----
-----BEGIN PGP PRIVATE KEY BLOCK-----
xxxxxx
-----END PGP PRIVATE KEY BLOCK-----
',

  /**
   * The default percentage rollout for new releases.  The first release for
   * any channel will always be 100% but all future releases will have a
   * default rollout value of this setting
   */
  defaultRollout: 0
};