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

Remove the mention of HOME environment variable #328

Merged
merged 4 commits into from
Oct 27, 2020
Merged

Remove the mention of HOME environment variable #328

merged 4 commits into from
Oct 27, 2020

Conversation

dsame
Copy link
Contributor

@dsame dsame commented Oct 9, 2020

Why:

The variable name clashes with unix shell HOME variable and confuses the users. The related issue is actions/runner-images#1301

The variable is not set for all hosted images and has no means in the moment

What's being changed:

I removed the mention of the variable from the documentation

Check off the following:

  • All of the tests are passing.
  • I have reviewed my changes in staging.

The variable name clashes with unix shell standard variable and confuses the users. Moreover it is not set for all hosted images.
@welcome
Copy link

welcome bot commented Oct 9, 2020

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@al-cheb
Copy link
Contributor

al-cheb commented Oct 9, 2020

I think you should provide more details, because if i use the bash shell on Windows, $HOME variable is available.

@maxim-lobanov
Copy link
Contributor

cc: @alepauly @hross for review

A bit more context:

  • Initial issue was "why we set this variable on Ubuntu and MacOS but not set on Windows system"
  • This variable is not actually set by GitHub. It is set by Ubuntu and MacOS system. Since we don't set it from our side, it doesn't make much sense to describe it in doc because it can confuse. I could be wrong of course

@janiceilene janiceilene added actions This issue or pull request should be reviewed by the docs actions team ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team labels Oct 9, 2020
@rachmari rachmari self-assigned this Oct 10, 2020
@thboop
Copy link
Contributor

thboop commented Oct 12, 2020

LGTM

Windows has a home equivalent too (HOMEPATH), but we don't document that. Removing this makes sense, documenting all of the OS specific env variables is a duplication of effort/information and something that I'm not sure provides a lot of value to a user.

Copy link
Contributor

@rachmari rachmari left a comment

Choose a reason for hiding this comment

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

@dsame I just wanted to raise a related change that was created in another pull request. Curious what your thoughts are there?

@@ -39,7 +39,6 @@ We strongly recommend that actions use environment variables to access the files
| Environment variable | Description |
| ---------------------|------------ |
| `CI` | Always set to `true`. |
Copy link
Contributor

Choose a reason for hiding this comment

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

We've got another similar PR where someone is suggesting to add the Windows-specific variable rather than removing the HOME variable. Curious what your thoughts are there?

I can see removing the OS-specific variables, but it might be helpful as we do describe that the directory is where user data is stored.

Suggested change
| `CI` | Always set to `true`. |
| `CI` | Always set to `true`. |
| `HOME` | (On Linux and macOS runners) The path to the {% data variables.product.prodname_dotcom %} home directory used to store user data. For example, `/github/home`. |
| `HOMEPATH` | (On Windows runners) The path to the {% data variables.product.prodname_dotcom %} home directory used to store user data. For example, `c:\Users\runneradmin`. |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My strongly opinion is we must not mess user home dir related and OS specific environment variable with the github specific variable.

In fact "The path to the GitHub home directory used to store user data" has nothing to do with "home dir to store user settings"

As a result, the first step is to remove the mentioning of UNIX-specific environment variable HOME and the second step is to add something like "GITHUB_HOME" or "GITHUB_DATA" or "GITGHUB_WORKDIR" which might point to the same directory as HOME or to another.

Copy link
Contributor

Choose a reason for hiding this comment

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

Personally, I agree with Sergey and @thboop mentioned the similar point #328 (comment)
We should not mess variables that are set by GitHub and variables are set by system. At least, because there are a ton of other system variables that we don't want to describe here.

but it might be helpful as we do describe that the directory is where user data is stored.

Actually, it is already described GITHUB_WORKSPACE.

The GitHub workspace directory path. The workspace directory is a copy of your repository if your workflow uses the actions/checkout action. If you don't use the actions/checkout action, the directory will be empty. For example, /home/runner/work/my-repo-name/my-repo-name.

I guess @dsame meant the same under GITHUB_HOME

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rachmari with the GITHUB_WORKSPACE already there's no sense to mention HOME variable at all. It works for windows users but confuses *nix guys because of messing with shell HOME variable.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good. I'll close out the other PR that is suggesting to add the HOMEPATH variable and I'll get this update shipped.

Copy link
Contributor

@rachmari rachmari left a comment

Choose a reason for hiding this comment

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

LGTM! 🚢 I'll get this merged right away.

@rachmari rachmari merged commit 3077414 into github:main Oct 27, 2020
@github-actions
Copy link
Contributor

Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours.

This was referenced Jan 16, 2022
@wpbonelli
Copy link
Contributor

wpbonelli commented Oct 16, 2022

Hi, although it's been removed from the default variables table, I noticed the docs still describe $HOME as a default environment variable in the naming conventions section, which initially gave me the impression that it will be set by the runner in all shells on all platforms. Maybe it is worth removing mention of $HOME from the naming conventions section as well, or clarifying that it is Unix-specific? Maybe I was the only one confused by this :)

@cmwilson21
Copy link
Contributor

@w-bonelli - Thanks for dropping in and leaving this comment. Would you mind turning it into a new issue? That way we can triage it for our wonderful writers to check into.

Thanks! 💖

@wpbonelli
Copy link
Contributor

@cmwilson21 done, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants