[Fix-14963] Fix the error of using shell task to obtain Home variable in Ubuntu system #14964
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.








Purpose of the pull request
close #14963
sudo -E:
The -E option retains the current user's environment variables. This means that when using sudo -E, the new child process will inherit the environment variables of the current user, rather than using the environment variables of the target user. This includes variables like PATH and others.
sudo -E is typically used to ensure that when using sudo to execute commands, some important environment variables remain unchanged to avoid affecting the command's execution.
sudo -i:
The -i option signifies logging in as the target user (usually the root user) and creating a new login shell. This switches to the environment of the target user, including the working directory, user variables, and so on, just as if you had logged in as the target user.
sudo -i is usually used when you need to perform tasks that require root privileges or when you need to execute commands within the environment of the target user.
Brief change log
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(or)
If your pull request contain incompatible change, you should also add it to
docs/docs/en/guide/upgrede/incompatible.md