yangyichao-mango opened a new issue #2925:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/2925


   **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**
   Steps to reproduce the behavior, for example:
   1.Make sure `sudo sysadminctl -addUser 1 -password 1` will produce error 
when you execute in your shell.
   1. Run OSUtils.exeCmd with `sudo sysadminctl -addUser 1 -password 1` params.
   2. 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](https://user-images.githubusercontent.com/29545877/84001665-ad408a80-a999-11ea-9e1a-d9f57232e9fa.png)
   
   
   **Which version of Dolphin Scheduler:**
    -[dev]
   
   
   **Requirement or improvement
   - Judge the result of `Process.waitFor()`
   - Remove the exeCmd from OSUtils, and use the 
`ShellExecutor.execCommand(command)` function.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to