Skip to content

Conversation

@zhuangchong
Copy link
Contributor

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

@codecov-commenter
Copy link

codecov-commenter commented Sep 26, 2023

Codecov Report

Merging #14964 (93ab468) into dev (020092e) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

❗ Current head 93ab468 differs from pull request most recent head d4814cf. Consider uploading reports for the commit d4814cf to get more accurate results

@@             Coverage Diff              @@
##                dev   #14964      +/-   ##
============================================
- Coverage     38.88%   38.86%   -0.03%     
+ Complexity     4605     4599       -6     
============================================
  Files          1235     1235              
  Lines         43411    43411              
  Branches       4801     4801              
============================================
- Hits          16880    16871       -9     
- Misses        24662    24671       +9     
  Partials       1869     1869              
Files Coverage Δ
...sk/api/shell/BaseLinuxShellInterceptorBuilder.java 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@zhuangchong zhuangchong added ready-to-merge bug Something isn't working labels Sep 26, 2023
@zhuangchong zhuangchong added this to the 3.1.9 milestone Sep 26, 2023
Copy link
Contributor

@caishunfeng caishunfeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhuangchong zhuangchong added 3.1.x for 3.1.x version 3.2.1 labels Sep 26, 2023
Copy link
Member

@ruanwenjun ruanwenjun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@zhuangchong zhuangchong merged commit 6de1e2c into apache:dev Sep 26, 2023
@zhuangchong zhuangchong deleted the fix-sudo-home branch September 26, 2023 09:18
zhuangchong added a commit that referenced this pull request Sep 27, 2023
zhongjiajie pushed a commit that referenced this pull request Oct 11, 2023
@zhuangchong zhuangchong added the release cherry-pick Mark this issue/PR had cherry-pick for release version label Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.1.x for 3.1.x version 3.2.1 backend bug Something isn't working ready-to-merge release cherry-pick Mark this issue/PR had cherry-pick for release version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [Task] The error of using shell task to obtain Home variable in Ubuntu system

4 participants