Skip to content

[BUG] There is no exitVal judge in OSUtils.exeCmd function #2925

@yangyichao-mango

Description

@yangyichao-mango

Describe the bug
There is no exitVal judge in OSUtils.exeCmd function. So when I run cmd in this function in MacOS and this cmd fail, there is no log or exception thrown.

To Reproduce
1.Make sure sudo sysadminctl -addUser 1 -password 1 will produce error when you execute in your shell.
2. Run OSUtils.exeCmd with sudo sysadminctl -addUser 1 -password 1 params.
3. Judge the p.waitFor()'s result, it will be 1 that means failed.

Expected behavior
Judge the p.waitFor()'s result, it will be 1 that means failed.

Screenshots
image

Which version of Dolphin Scheduler:
-[dev]

**Requirement or improvement

  • Judge the result of Process.waitFor() or record the creating working dir and user detail log by TaskLogger
  • Remove the exeCmd from OSUtils, and use the ShellExecutor.execCommand(command) function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions