Skip to content

ProcessExecutor can't run command from working directory #1

@pgorbachev

Description

@pgorbachev

Execution of the following snippet fails with

LocalProcessBuilderFactory 
                            .newLocalProcessBuilder()
/* some configuration omitted */
                            .workDirectory(sdkManagerPath)
                            .commandAndArguments("sdkmanager");

fails with following error

java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method) ~[?:1.8.0_321]
at java.lang.ProcessImpl.(ProcessImpl.java:453) ~[?:1.8.0_321]
at java.lang.ProcessImpl.start(ProcessImpl.java:140) ~[?:1.8.0_321]
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ~[?:1.8.0_321]

If you specify full path to command in commandAndArguments then everything command is executed correctly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions