jenkinsci / jenkinsci/xshell-plugin

[JENKINS-70323] xshell returns mixture of unix/mac and Windows path

Open
#278 1 comment 0 reactions 0 assignees View on GitHub
component:xshell-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
16
Forks
19
Avg merge
1h 53m
Merged PRs (30d)
1

Description

Executing a script result in a mixture of Windows and mac path and an IOException is raised.

Running as SYSTEM

[EnvInject] - Loading node environment variables.

Building remotely on macbs04 (mac) in workspace /Users/jenkins/jenkins/workspace/TEST-JOB-MAC-STRANGE-WS-PATH

[TEST-JOB-MAC-STRANGE-WS-PATH] $ echo "Hello World"

FATAL: Command execution failed.

java.io.IOException: Process working directory '/Users/jenkins/jenkins/\Users\jenkins\jenkins\workspace\TEST-JOB-MAC-STRANGE-WS-PATH' doesn't exist!

    at hudson.Proc$LocalProc.(Proc.java:252)

    at hudson.Proc$LocalProc.(Proc.java:223)

    at hudson.Launcher$LocalLauncher.launch(Launcher.java:997)

    at hudson.Launcher$ProcStarter.start(Launcher.java:509)

    at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1398)

    at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1340)

    at hudson.remoting.UserRequest.perform(UserRequest.java:211)

    at hudson.remoting.UserRequest.perform(UserRequest.java:54)

    at hudson.remoting.Request$2.run(Request.java:376)

    at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)

    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)

    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)

DEBUGGING INFO

dec. 21, 2022 8:14:23 FM FINE hudson.plugins.xshell.XShellBuilder

Command line: echo "Hello World"

dec. 21, 2022 8:14:23 FM FINE hudson.plugins.xshell.XShellBuilder

Working directory: /Users/jenkins/jenkins/workspace/TEST-JOB-MAC-STRANGE-WS-PATH/

dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder

Unmodified command line: echo "Hello World"

dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder

Regex to kill:

dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder

Time allocated before kill:

dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder

File separators sanitized: echo "Hello World"

dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder

Expanded build environment vars: echo "Hello World"

dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder

Environment variables sanitized: echo "Hello World"

dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder

Execute from working directory: echo "Hello World"

dec. 21, 2022 8:15:07 FM FINEST hudson.plugins.xshell.XShellBuilder

 

Omitting env vars

...

dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder

Command line: echo "Hello World"

dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder

Working directory: /Users/Jenkins/jenkins/workspace/TEST-JOB-MAC-STRANGE-WS-PATH

---
Originally reported by kengra1, imported from: xshell returns mixture of unix/mac and Windows path


  • status: Open
  • priority: Major
  • component(s): xshell-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 20260512-210953

Raw content of original issue

Executing a script result in a mixture of Windows and mac path and an IOException is raised.

Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building remotely on macbs04 (mac) in workspace /Users/jenkins/jenkins/workspace/TEST-JOB-MAC-STRANGE-WS-PATH
[TEST-JOB-MAC-STRANGE-WS-PATH] $ echo "Hello World"
FATAL: Command execution failed.
java.io.IOException: Process working directory '/Users/jenkins/jenkins/\Users\jenkins\jenkins\workspace\TEST-JOB-MAC-STRANGE-WS-PATH' doesn't exist!
    at hudson.Proc$LocalProc.<init>(Proc.java:252)
    at hudson.Proc$LocalProc.<init>(Proc.java:223)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:997)
    at hudson.Launcher$ProcStarter.start(Launcher.java:509)
    at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1398)
    at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1340)
    at hudson.remoting.UserRequest.perform(UserRequest.java:211)
    at hudson.remoting.UserRequest.perform(UserRequest.java:54)
    at hudson.remoting.Request$2.run(Request.java:376)
    at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)

DEBUGGING INFO
dec. 21, 2022 8:14:23 FM FINE hudson.plugins.xshell.XShellBuilder
Command line: echo "Hello World"
dec. 21, 2022 8:14:23 FM FINE hudson.plugins.xshell.XShellBuilder
Working directory: /Users/jenkins/jenkins/workspace/TEST-JOB-MAC-STRANGE-WS-PATH/
dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder
Unmodified command line: echo "Hello World"
dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder
Regex to kill:
dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder
Time allocated before kill:
dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder
File separators sanitized: echo "Hello World"
dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder
Expanded build environment vars: echo "Hello World"
dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder
Environment variables sanitized: echo "Hello World"
dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder
Execute from working directory: echo "Hello World"
dec. 21, 2022 8:15:07 FM FINEST hudson.plugins.xshell.XShellBuilder

 

Omitting env vars

...

dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder
Command line: echo "Hello World"
dec. 21, 2022 8:15:07 FM FINE hudson.plugins.xshell.XShellBuilder
Working directory: /Users/Jenkins/jenkins/workspace/TEST-JOB-MAC-STRANGE-WS-PATH

environment

```
Controller: Windows 2016 server

Agent MAC

Jenkins 2.382

xshell 129.v99c1dcfa_d3d2 (upgraded from xshell-v10)

```

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.