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

Make use of user config multiplatform #1203

Closed
c33s opened this issue Dec 11, 2016 · 2 comments
Closed

Make use of user config multiplatform #1203

c33s opened this issue Dec 11, 2016 · 2 comments
Assignees

Comments

@c33s
Copy link

c33s commented Dec 11, 2016

using eval and os detection is quite uncool

        if (false === $this->isWindows()) {
            $local_config_file = exec('eval echo ~/.grav/config');
            if (file_exists($local_config_file)) {
                $this->local_config = Yaml::parse($local_config_file);
                $this->output->writeln('Read local config from <cyan>' . $local_config_file . '</cyan>');
            }
        }

the home directory can be read from a php server variable $_SERVER[HOME] so such an ugly hack would not be necessary.

@flaviocopes
Copy link
Contributor

Good catch. Made a PR to fix this, glad if you can test it on Windows, as I don't have a Win machine at hand now.

@flaviocopes
Copy link
Contributor

PR merged

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

No branches or pull requests

3 participants