Skip to content

Presence of a TEAMCITY_PROJECT_NAME environment variable makes builds fail if TeamCity service unavailable #1570

Closed
@stinos

Description

@stinos

With release 3.19.0 in, this commit leads to TeamCity CI builds failing for us with Option --teamcity specified but the extension is not installed. even though we do not specify this option and we do not use any of TeamCity's nunit-related features: we just happen to use nunit3-console to run tests.

  • The full command line being used: nunit3-console --noheader --noresult /path/to/tests.dll
  • Method of installation (e.g. NuGet, zip, msi): NuGet, but not relevant
  • Version of the NUnit Engine/Console: 3.19.0

Can be reproduced easily by setting a non-empty TEAMCITY_PROJECT_NAME environment variable.

So:

  • the error message says --teamcity is specified even though that is not the case, which is a bit confusing
  • the Options code treats the presence of a TEAMCITY_PROJECT_NAME environment variable as running under TeamCity. While correct, it also treats that as 'must use TeamCity extension', but that is for us not the case

I'd suggest that either the behavior is reverted, or modified to show a warning instead of an error (perhaps with a modified message stating 'TeamCity detected' or similar), or else made such that the user needs to explicitly request the TeamCity functionality (so by passing --teamcity or by another environment variable).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions