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

docs: Fix Windows PATH issues #2280

Closed
bep opened this issue Jul 14, 2016 · 7 comments
Closed

docs: Fix Windows PATH issues #2280

bep opened this issue Jul 14, 2016 · 7 comments

Comments

@bep
Copy link
Member

bep commented Jul 14, 2016

See https://discuss.gohugo.io/t/windows-terminal-not-working/3676

The PATH entry should be the folder where Hugo lives, not the binary.

@anthonyfok
Copy link
Member

Hi @ bep, thank you for the heads up.

Almost ready to make a commit, but then saw the current paragraphs for Windows 7 and 8.x, and after comparing with https://java.com/en/download/help/path.xml, I hesitated. But maybe I will just fix the current error in the Windows 10 section and deal with other text later.

Will be pushing when I am back home.

@bep
Copy link
Member Author

bep commented Jul 18, 2016

I don't get it? What is wrong with my bug report re Win 7 and 8?

@anthonyfok
Copy link
Member

Oh, nothing wrong with your bug report at all: It is not directly related, but it is in the vicinity. What I had trouble with was this following paragraph that was first submitted by @JoeArizona back in February 2016:

For Windows 7 and 8.x users

Windows 7 and 8.1 do not include the easy path editor included in Windows 10, so non-technical users on those platforms are advised to install a free third-party path editor like Windows Environment Variables Editor or Path Editor.

What I think is that there are probably easier ways to edit the user PATH or system PATH without using any third-party path editor. I guess it is not too difficult to append ;C:\Hugo\bin to PATH even on Windows 7 and 8 inside the "Advanced system settings" dialogs or otherwise. Then there is also the case where the Advanced system settings may not work for non-Administrative users, and also Windows Vista and XP, see e.g. http://superuser.com/questions/165909/ and https://support.microsoft.com/en-gb/kb/931715

What I was also thinking was that it may be easier to:

  1. Create a short YouTube video or animated GIF to actually show the user how.
  2. Create an installer which automates PATH setting à la go1.6.3.windows-amd64.msi (wait, did it just come out? I thought it was still 1.6.2 only a few days ago!)

But yeah, both of these are a lot of work on our part, and these are definitely out of scope for this bug report. (Just me dreaming out loud.)

So yeah, don't worry about it, and I will be pushing shortly when I get home, fixing this issue and #2285 specifically and not anything else.

@JoeUX
Copy link
Contributor

JoeUX commented Jul 18, 2016

Yo, sorry about that. The .exe file should not have been in the path.

Just in case there's any ambiguity about this statement: "The PATH entry should be the folder where Hugo lives, not the binary."

While the "binary" file should not be in the path, the bin folder should definitely be in the path if they put the hugo.exe file there. Windows command line won't work if the path is C:/Hugo and hugo.exe is in C:/Hugo/bin. bep probably knows this – I just didn't want people to mix up binary and bin.

As for Windows 7 and 8 instructions, a video could work, but don't underestimate how much people can screw up their systems trying to change the PATH variable with the Windows interface. It's one field. It's like the field for your first name on a web form, just one field. And it goes on forever, this giant string of smushed up paths separated by semicolons. It's easy to highlight the whole string and delete it with an errant keystroke. In fact, I think it's all highlighted by default when you open it, so one keystroke and it's all gone. The Java doc is missing a step, and novice users will stumble with those instructions. It might actually be easier to use the command line.

@anthonyfok anthonyfok changed the title docs: FIx Windows PATH issues docs: Fix Windows PATH issues Jul 18, 2016
anthonyfok added a commit that referenced this issue Jul 19, 2016
i.e., "The PATH entry should be the folder where Hugo lives, not the binary."
Fixes #2280.

Also fix a rendering issue with list entries that consist of multiple
paragraphs by using four spaces instead of two.  Special thanks to
@shurcooL for the insight!  (Fixes #2285)

Also made a few minor formatting tweaks.
@anthonyfok
Copy link
Member

The fix is committed and now live at https://gohugo.io/tutorials/installing-on-windows/#for-windows-10-users

@JoeArizona Thank you for your insights. You have a good point there. Definitely don't want the end-user inadvertently messing up their original PATH variable.

I wonder if we should add code to hugo.exe itself for manipulating the system or user PATH environment variable, for Windows only, in a Hugo subcommand, e.g. hugo set-windows-PATH. Good idea? Bad idea?

@anthonyfok anthonyfok removed their assignment Jul 19, 2016
tychoish pushed a commit to tychoish/hugo that referenced this issue Aug 13, 2017
i.e., "The PATH entry should be the folder where Hugo lives, not the binary."
Fixes gohugoio#2280.

Also fix a rendering issue with list entries that consist of multiple
paragraphs by using four spaces instead of two.  Special thanks to
@shurcooL for the insight!  (Fixes gohugoio#2285)

Also made a few minor formatting tweaks.
@EYITAY
Copy link

EYITAY commented Aug 30, 2019

Oh, nothing wrong with your bug report at all: It is not directly related, but it is in the vicinity. What I had trouble with was this following paragraph that was first submitted by @JoeArizona back in February 2016:

For Windows 7 and 8.x users

Windows 7 and 8.1 do not include the easy path editor included in Windows 10, so non-technical users on those platforms are advised to install a free third-party path editor like Windows Environment Variables Editor or Path Editor.

What I think is that there are probably easier ways to edit the user PATH or system PATH without using any third-party path editor. I guess it is not too difficult to append ;C:\Hugo\bin to PATH even on Windows 7 and 8 inside the "Advanced system settings" dialogs or otherwise. Then there is also the case where the Advanced system settings may not work for non-Administrative users, and also Windows Vista and XP, see e.g. http://superuser.com/questions/165909/ and https://support.microsoft.com/en-gb/kb/931715

What I was also thinking was that it may be easier to:

  1. Create a short YouTube video or animated GIF to actually show the user how.
  2. Create an installer which automates PATH setting à la go1.6.3.windows-amd64.msi (wait, did it just come out? I thought it was still 1.6.2 only a few days ago!)

But yeah, both of these are a lot of work on our part, and these are definitely out of scope for this bug report. (Just me dreaming out loud.)

So yeah, don't worry about it, and I will be pushing shortly when I get home, fixing this issue and #2285 specifically and not anything else.

Many thanks to @anthonyfok

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants