Skip to content

Conversation

@STAR-173
Copy link

@STAR-173 STAR-173 commented Dec 8, 2024

Fixes #4313

Summary:

This PR modifies the validateMethod function in the _command-loader.js file to enhance error messages by displaying the file paths of both the original and conflicting command definitions when a duplicate command is detected. This change makes it easier to debug and track the source of duplicate commands.

Example Error Message:

When a duplicate command is found, the error message will now look like this:

Error while loading the API commands: the command testNamespace.testCommand() is already defined.
- First defined in: /path/to/firstFile.js
- Current file: /path/to/secondFile.js

@CLAassistant
Copy link

CLAassistant commented Dec 8, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

github-actions bot commented Dec 8, 2024

Status

  • ❌ No modified files found in the types directory.
    Please make sure to include types for any changes you have made. Thank you!.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display the file paths in the error message for the error "the command .myCommand() is already defined."

2 participants