Skip to content

Syntax error in TestMigrationService prevents CLI loading #2004

@zainforbjs

Description

@zainforbjs

Describe the bug
The CLI module fails to load due to a syntax error in the TestMigrationService model. Error: Invalid Syntax Closing [}] not found

This prevents the entire CLI module from loading.

To Reproduce

  1. Install Wheels CLI: box install wheels-cli or simply link latest CLI from develop branch to commandBox
  2. Run box reload or start CommandBox
  3. Observe the error during module loading

Expected behavior
The CLI module should load successfully without errors.

Desktop:

  • OS: macOS
  • Wheels Branch: Develop

Additional context
File: cli/src/models/TestMigrationService.cfc:556

Problematic Code:

pattern = 'assert\s*\(\s*"structKeyExists\s*\(\s*([^,]+),\s*["\']([^"\']+)["\']\s*\)"\s*\)',

Root Cause: Complex regex pattern containing nested escaped quotes is causing Adobe CF parser issues during module initialization. The combination of single quotes, double quotes, and escaped quotes within the regex pattern confuses the parser.

Suggested Fix: Rewrite the pattern using different quote escaping:

pattern = "assert\s*\(\s*""structKeyExists\s*\(\s*([^,]+),\s*[']([^']+)[']\s*\)""\s*\)",

Metadata

Metadata

Assignees

No one assigned

    Labels

    phase:1-stabilizeBugs, cleanup, CI fixes — tackle first

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions