domdinnes / node-flyway

Apply version control to databases from within a Node.js application.
23 stars 6 forks source link

Always quote command line option strings - Resolves domdinnes/node-flyway#29 #31

Closed cadam11 closed 1 month ago

cadam11 commented 1 month ago

Description

This pull request addresses issue #29 by ensuring that command line option strings are always quoted. This update enhances the handling of options containing spaces or special characters, ensuring consistent behavior across different environments.

Key Changes

  1. Command Line Options Quoting:

    • Updated the quoting mechanism in src/internal/flyway-command-line-options.ts to use appropriate quotes based on the platform (single quotes for Unix-based systems and double quotes for Windows).
  2. Tests Adjustments:

    • Modified related integration and unit tests in test/integration/migrate.test.ts and test/unit/internal/flyway-command-line-options.test.ts to align with the new quoting logic.

Context

The changes ensure that all command line options are correctly interpreted by the system, resolving issues where options with spaces or special characters were previously mishandled.