Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the backup of /etc/environment to /etc/environmente deliberate? #790

Closed
2 of 5 tasks
rbellamy opened this issue Apr 27, 2020 · 2 comments
Closed
2 of 5 tasks

Is the backup of /etc/environment to /etc/environmente deliberate? #790

rbellamy opened this issue Apr 27, 2020 · 2 comments
Assignees
Labels
OS: Ubuntu question Further information is requested

Comments

@rbellamy
Copy link

rbellamy commented Apr 27, 2020

Describe the bug
Within etc-environment.sh there is the following sed command:
https://github.com/actions/virtual-environments/blob/master/images/linux/scripts/helpers/etc-environment.sh#L29

sudo sed -ie "s%^${variable_name}=.*$%${variable_name}=\"${variable_value}\"%" /etc/environment

The -ie has the effect of backing up the file with an e suffix. Was this deliberate?

root@897f04685dc1:/# ls /etc/environment*
/etc/environment  /etc/environmente
root@897f04685dc1:/# diff /etc/environment /etc/environmente
1c1
< PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
---
> PATH="/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

Area for Triage:
Deployments/Release

Question, Bug, or Feature?:
Question

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

Expected behavior
Either .bak or no suffix.

Actual behavior
Unexpected file in /etc.

@vmapetr vmapetr added OS: Ubuntu question Further information is requested and removed needs triage labels Apr 28, 2020
@dsame dsame mentioned this issue Apr 28, 2020
2 tasks
@dsame
Copy link
Contributor

dsame commented Apr 29, 2020

@rbellamy Thanks for your note, the fix is applied in the PR #792 and will be deployed in a week or two

@miketimofeev miketimofeev added the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label Apr 29, 2020
@dsame
Copy link
Contributor

dsame commented May 14, 2020

The fix deployed to the production

@dsame dsame closed this as completed May 14, 2020
@AlenaSviridenko AlenaSviridenko removed the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: Ubuntu question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants