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

Starting new site: Error getting hugo version, Make sure hugo is available in path. #15

Open
GAZ082 opened this issue Oct 16, 2018 · 2 comments

Comments

@GAZ082
Copy link

GAZ082 commented Oct 16, 2018

Arch Linux
Linux 4.18.12-arch1-1-ARCH #1 SMP PREEMPT Thu Oct 4 01:01:27 UTC 2018 x86_64 GNU/Linux

I do have hugo in my path.

@wmturner
Copy link

FYI I get this as well. I can even perform get version correctly.

@ralph-mcardell
Copy link

I have encountered this error when attempting to create a new site with Hugofy after creating a VS Code Remote-Container container with my Hugo and related tools installed plus the Hugofy extension and placing the .devcontainer files under Git control.

Asking for the Hugo version with Hugofy: Version is fine.
Asking for a new site with Hugofy: New Site fails with a "Error getting hugo version, Make sure hugo is available in path." error.

After some investigation, toggling Developer Tools on (on Help menu) and reading a bit of the extension source here on GitHub, this seems to be because:

1/ the error message for some Hugofy commands appears to have been copy and pasted from the Version command handler, hence misleadingly mentions hugo version.

2/ The actual error logged on the browser debug console was:
"[Extension Host] stderr: Error: /workspaces/project_root_dir already exists and is not empty. See --force."
(project_root_dir not the real workspace directory name).

The workspace directory is not empty as it already contains VSCode .devcontainer and Git .git directories. I would think sort of situation might occur quite often - even if not using a container. A developer might modify some settings causing a .vscode directory and files to be created before attempting to create a new site, and of course they may also get their project under source control early as well.

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

No branches or pull requests

3 participants