Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Example Configuration File #158

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

nlordell
Copy link
Contributor

Description

When running with the example configuration file, you get the following error:

Error parsing configuration file: SyntaxError: Expected double-quoted property name in JSON at position 387 (line 11 column 17)
    at JSON.parse (<anonymous>)
    at validateJSON (/usr/src/app/dist/src/index.js:122:27)
    at Command.<anonymous> (/usr/src/app/dist/src/index.js:65:24)
    at Command.listener [as _actionHandler] (/usr/src/app/node_modules/commander/lib/command.js:482:17)
    at /usr/src/app/node_modules/commander/lib/command.js:1300:65
    at Command._chainOrCall (/usr/src/app/node_modules/commander/lib/command.js:1197:12)
    at Command._parseCommand (/usr/src/app/node_modules/commander/lib/command.js:1300:27)
    at /usr/src/app/node_modules/commander/lib/command.js:1081:27
    at Command._chainOrCall (/usr/src/app/node_modules/commander/lib/command.js:1197:12)
    at Command._dispatchSubcommand (/usr/src/app/node_modules/commander/lib/command.js:1077:23)

It appears that it doesn't like the trailing ,s (so it appears to only support plain old JSON and not JSONc or JSON5).

Changes

This PR fixes the example configuration file to be valid JSON (and also removes some trailing whitespace in the file).

How to test

  1. Run the Docker image with the instructions from the README and see no more error.

When running with the example configuration file, you get the following
error:

```
Error parsing configuration file: SyntaxError: Expected double-quoted property name in JSON at position 387 (line 11 column 17)
    at JSON.parse (<anonymous>)
    at validateJSON (/usr/src/app/dist/src/index.js:122:27)
    at Command.<anonymous> (/usr/src/app/dist/src/index.js:65:24)
    at Command.listener [as _actionHandler] (/usr/src/app/node_modules/commander/lib/command.js:482:17)
    at /usr/src/app/node_modules/commander/lib/command.js:1300:65
    at Command._chainOrCall (/usr/src/app/node_modules/commander/lib/command.js:1197:12)
    at Command._parseCommand (/usr/src/app/node_modules/commander/lib/command.js:1300:27)
    at /usr/src/app/node_modules/commander/lib/command.js:1081:27
    at Command._chainOrCall (/usr/src/app/node_modules/commander/lib/command.js:1197:12)
    at Command._dispatchSubcommand (/usr/src/app/node_modules/commander/lib/command.js:1077:23)
```

It appears that it doesn't like the trailing `,`s (so it appears to only
support plain old JSON and not JSONc or JSON5).

This PR fixes the example configuration file to be valid JSON (and also
removes some trailing whitespace in the file).
Copy link

github-actions bot commented Aug 30, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@nlordell
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Aug 30, 2024
@nlordell
Copy link
Contributor Author

It looks like the CLA bot is contradicting itself 😅

image

image

Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just seeing this PR now. Thanks @nlordell !

@anxolin anxolin merged commit 4feaf45 into cowprotocol:main Nov 28, 2024
2 of 3 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants