Skip to content

--env flag is documented as "environment variable files" (valueHint: path) but actually takes KEY=VALUE pairs #17

Description

@riglar

Summary

The --env / -e flag description and valueHint describe it as a file path, but the implementation parses KEY=VALUE pairs (matching Maestro's -e and the previous oclif CLI). This is a documentation regression that will mislead users migrating from the old CLI.

Details

Definition (src/config/flags/environment.flags.ts):

env: {
  type: 'string',
  alias: ['e'],
  description: 'One or more environment variable files to inject into your flows (may be repeated)',
  valueHint: 'path',
},

But the value is parsed as KEY=VALUE (src/services/test-submission.service.ts parseKeyValuePairs):

const [key, ...value] = cur.split('=');
acc[key] = value.join('=');

i.e. dcd cloud ... -e API_HOST=https://staging.example.com sets an env var named API_HOST. Passing a file path does not read the file — it would create a var literally named after the path.

The old CLI described it correctly as "One or more environment variables to inject into your flows".

Suggested fix

  • Description → something like One or more environment variables to inject into your flows (format: KEY=VALUE, may be repeated).
  • Remove valueHint: 'path' (or set it to KEY=VALUE).

Found during a full feature sweep of v5.0.0 (backwards-compat review against ../dcd/cli).

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions