Skip to content

EnvSyntax

EnvSyntax = "assignment" | "dotenv" | "posix-export" | "win32-set"

Defined in: env/types.ts:34

The surface syntax an assignment is written in.

  • assignment — the bare NAME=value of one execve environment entry, as env(1) and docker --env take it. The value is literal: it already occupies a whole argument, so quoting it would make the quotes part of it.
  • dotenv — a .env file line: # comments, blank lines, and values quoted only when they need it.
  • posix-export — a POSIX shell export NAME='value' statement, safe to source.
  • win32-set — a cmd.exe set "NAME=value" statement, safe in a batch file.