2

In package.json I have following configuration:

  "scripts": {
    ...
    "api:update": "curl -k -H 'Cookie: JSESSIONID=$npm_package_config_session'  -o api-docs.json https://localhost:8445/v2/api-docs",
    ...
  }

Variable is defined using following command: npm config set project:session XXXX

When npm config get project:session is executed I get proper value.

Any suggestion how to resolve $npm_package_config_session inside the single quotes?

Blazh
  • 53
  • 1
  • 6
  • 1
    Is there a reason you're avoiding using double quotes as the shell intends? – Ian MacDonald Dec 03 '19 at 15:45
  • No real reason, looks like it works with double quotes: `"api:update": "curl -k -H \"Cookie: JSESSIONID=$npm_package_config_session\" -o api-docs.json https://localhost:8445/v2/api-docs --verbose"`. Thnx for the tip! – Blazh Dec 03 '19 at 15:55

0 Answers0