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

Simple refactor: find-and-replace whoami with id -u -n in scripts #854

Closed
coolaj86 opened this issue Jun 5, 2024 · 3 comments
Closed

Simple refactor: find-and-replace whoami with id -u -n in scripts #854

coolaj86 opened this issue Jun 5, 2024 · 3 comments
Labels
enhancement New feature or request first-timers-only good first issue Good for newcomers

Comments

@coolaj86
Copy link
Member

coolaj86 commented Jun 5, 2024

whoami is generally available on all Unix-y systems, but id -u -n is the POSIX standard with guaranteed behavior.

This is literally as simple as doing a find-and-replace across the repo (such as with sd, or any code editor tool).

Finding the files with whoami:

git clone https://github.com/webinstall/webi-installers ./webi-installers
pushd webi-installers/
rg 'whoami' || grep -r 'whoami' .

For reference: https://pubs.opengroup.org/onlinepubs/009695399/utilities/id.html

@coolaj86 coolaj86 added enhancement New feature or request good first issue Good for newcomers first-timers-only labels Jun 5, 2024
@coolaj86 coolaj86 changed the title Simple refactor: replace whoami with id -u -n for POSIX-compliance Simple refactor: find-and-replace whoami with id -u -n in scripts Jun 5, 2024
HacDan added a commit to HacDan/webi-installers that referenced this issue Jun 5, 2024
@shuchitpant
Copy link

Hi @coolaj86,

I would like to work on this issue.

Could you please assign this issue to me?

@shuchitpant
Copy link

Hi AJ,

I've raised a PR (#915 ), that addresses this issue, kindly go through this and let me know if there are any changes.

@coolaj86
Copy link
Member Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request first-timers-only good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants