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

Ghost local install doesn't ignore dot files #868

Closed
regiellis opened this issue Jan 13, 2019 · 2 comments · Fixed by #872
Closed

Ghost local install doesn't ignore dot files #868

regiellis opened this issue Jan 13, 2019 · 2 comments · Fixed by #872

Comments

@regiellis
Copy link

regiellis commented Jan 13, 2019

Issue Summary

When running ghost local install in a directory that contains a required dotfile; Installation fails with the message "Current directory is not empty, Ghost cannot be installed here." There are instance when these dot files are necessary or required by other systems. In my case when using Nodenv, Nodenv requires that a .node-version file be in the directory to map the correct local version of node that you would like to use.

To Reproduce

Assuming that nodenv and the node version you would like to use is installed. Assuming that the ghost-cli is installed and working correctly. Assuming CWD is the selected install directory for your ghost site.

  1. nodenv local [node-version-number]
  2. ghost install local
Terminal Output

A SystemError occurred.

Message: Current directory is not empty, Ghost cannot be installed here.
Debug Information:
OS: Mac OS X, v10.14.2
Node Version: v10.13.0
Ghost-CLI Version: 1.9.8
Environment: production
Command: 'ghost install local'
Try running ghost doctor to check your system for known issues.
You can always refer to https://docs.ghost.org/docs/troubleshooting#section-cli-errors for troubleshooting.

Technical details:

  • Ghost Version: 1.9.8
  • Node Version: 10.13.0
  • Browser/OS: n/a
  • Database: n/a

Workaround:

A simple work around is to make the node version global, but this defeats the purpose of having a version manager. Another workaround is to move the dot file one level higher; this causes an issue if you are deploying from a repo that use the files on a remote server.

It would be nice to have the ability via the command line to ignore dot files without removing them.

@ErisDS ErisDS transferred this issue from TryGhost/Ghost Jan 22, 2019
@ErisDS
Copy link
Member

ErisDS commented Jan 22, 2019

I've transferred this issue to the Ghost-CLI repo. We had similar reports around .git folders, I am not sure if any fixes were added. Either way, PRs would be welcome 👍

@acburdine
Copy link
Member

so .ghost-cli is the only dotfile we really care about, I can add an exception for all dotfiles except .ghost-cli

@acburdine acburdine self-assigned this Jan 26, 2019
acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Jan 27, 2019
closes TryGhost#868
- add dir-is-empty util that checks empty directories correctly
acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Jan 27, 2019
closes TryGhost#868
- add dir-is-empty util that checks empty directories correctly
acburdine added a commit that referenced this issue Jan 27, 2019
closes #868
- add dir-is-empty util that checks empty directories correctly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants