jenkinsci / jenkinsci/agent-setup-plugin

[JENKINS-56081] Slave node environment path is duplicated

Open
#126 0 comments 0 reactions 0 assignees View on GitHub
component:slave-setup-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
11
Forks
23
Avg merge
21h 13m
Merged PRs (30d)
1

Description

When running a slave with the path set in environment variables the (added) path is duplicated.

Steps



  1. Created a slave to run on localhost by Java Web Start.

  2. Add node properties environment variables, name: Path value: $Path;X;Y;Z

  3. Run pipeline job that displays the path

Expected

To see the path ending with ;X;Y;Z

Actual

The path ends with :X;Y;Z;X;Y;Z

 

pipeline {

agent {
label 'slave-1'
}
stages {
stage('path') {
steps {
bat('path')
}
} //stage
} //stages
} //pipeline


 

---
Originally reported by wibek, imported from: Slave node environment path is duplicated


  • assignee: peppe
  • status: Open
  • priority: Minor
  • component(s): slave-setup-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20251216-225446

Raw content of original issue

When running a slave with the path set in environment variables the (added) path is duplicated.

Steps



  1. Created a slave to run on localhost by Java Web Start.

  2. Add node properties environment variables, name: Path value: $Path;X;Y;Z

  3. Run pipeline job that displays the path

Expected

To see the path ending with ;X;Y;Z

Actual

The path ends with :X;Y;Z;X;Y;Z

 



pipeline {

agent {
label 'slave-1'
}
stages {
stage('path') {
steps {
bat('path')
}
} //stage
} //stages
} //pipeline



 

environment

```
Jenkins ver. 2.150.2

Windows 10 pro

Environment injector plugin 2.1.6
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.