Skip to content

ARDUINO_USER_AGENT environment variable not set #2318

Closed
@PaulStoffregen

Description

@PaulStoffregen

Describe the problem

Latest IDE nightly builds are not setting the ARDUINO_USER_AGENT environment variable when running tools.

To reproduce

Using Linux x86-64:

1: File - Preferences, add Teensy URL https://www.pjrc.com/teensy/package_teensy_index.json
2: Boards Manager, Install Teensy 0.59.4
3: Copy this modified teensy_size tool to ~/.arduino15/packages/teensy/tools/teensy-tools/0.59.4/
4: Click Verify and look for "ARDUINO_USER_AGENT = " in the output panel.

image

Alternately, edit the source code for any tool to print the ARDUINO_USER_AGENT environment variable. This copy of teensy_size merely has these lines added:

      const char *ardua = getenv("ARDUINO_USER_AGENT");
      fprintf(stderr, "ARDUINO_USER_AGENT = %s\n", ardua);

Expected behavior

The ARDUINO_USER_AGENT environment variable is supposed to be set, according to the Platform Specification, under "Environment variables":

https://arduino.github.io/arduino-cli/0.35/platform-specification/#environment-variables

Arduino IDE 2.2.1 does it correctly:

image

Arduino IDE version

arduino-ide_nightly-20231227_Linux_64bit

Operating system

Linux

Operating system version

Ubuntu 22.04

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions