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

install-nix: Solve #971 USER == NULL #1549

Closed
wants to merge 5 commits into from

Conversation

Anton-Latukha
Copy link

This addresses #971.

Which also encountered by me:

docker run -it alpine env
docker run -it alpine /bin/sh -c 'echo "$USER <-this" ; whoami'
docker run -it ubuntu /bin/sh -c 'echo "$USER <-this" ; whoami'
docker run -it base/archlinux /bin/sh -c 'echo "$USER <-this" ; whoami'
docker run -it nixos/nix /bin/sh -c 'echo "$USER <-this" ; whoami'

This is because Docker env not goes through login and login shell, so shell not sources login config, so shell not defined that env variables.

We touch USER only when it is not defined. And as it is shell, anyway it is a copy variable in scope of this script.

@Anton-Latukha Anton-Latukha changed the title install-nix: Solve USER == NULL install-nix: Solve #971 USER == NULL Sep 2, 2017
@grahamc
Copy link
Member

grahamc commented Sep 2, 2017

lgtm

@Anton-Latukha
Copy link
Author

Anton-Latukha commented Sep 2, 2017

Does project flow with squash on merge, - or I need to do squashing/acceptance squashing.

@wmertens
Copy link
Contributor

LGTM. @Anton-Latukha maybe you want to squash it all into a single commit.

@Anton-Latukha
Copy link
Author

Anton-Latukha commented Oct 16, 2017

That is what I asked above.

Is there is no squash on merge enabled and no workflow to squash on merge in repository.

It seems life the natural way to move.

It is nature of someone who contribute pull request and waits on acceptance - to better it's pull request. To make fixes, add comments, polish, refactor code and text.

With squash on pull request contributor - he needs to squash all commits every time, at every fix, at every improvement, to keep things clean and ready to merge.

With squash on merge on maintainer side:

  1. Maintainer doesn't need to write to me that I need to make squash.
  2. Maintainer doesn't need to wait when and do I going to do squash.
  3. Maintainer can chose by himself the name of commit. So standardized commit names can be enforced.
  4. All can be done as maintainer wants, when maintainer wants.
  5. It is already a GUI feature on GitHub. https://help.github.com/articles/merging-a-pull-request/#merging-a-pull-request-on-github

I created a relevant to this topic issue:

echo "$0: \$USER is not set" >&2
exit 1
echo "$0: Environment variable USER is not set" >&2
USER="$(whoami)" # Taking username from UID
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't that also be readonly?

@Anton-Latukha
Copy link
Author

Anton-Latukha commented Apr 27, 2018

I was solving the real problem.

Most of scripts was in very poor state. And they do not have constants used. And they still do not.

I needed to merge at least something to have a progress in master.
To continue the work. To know that my things get accepted.

I offered myself to be a guy who would make a great quality Nix install scrips, and who would always give his time to maintain it.
My experience in community is great, except this Nix scripts.

I submitted 4 PRs. I've made a lot of reasoning for them, documentation, demo setups, etc. And nothing got merged. In 8 month.

If I can not get a tiniest changes. Changes that solve real world reported and myself experienced cases, like #971. Then, what can I do about that.

Now it can be cleaned up.

Anyway. Thanks to everybody.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants