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

Reliable way, in Rake, to determine whether we are being run by Fezzik #28

Closed
cespare opened this issue May 16, 2012 · 0 comments
Closed

Comments

@cespare
Copy link
Collaborator

cespare commented May 16, 2012

We should define a constant or env variable inside the fez command, so that it is easy to distinguish whether we are being run by Fezzik inside the Rakefile.

The main use case for this is to wrap the Fezzik loading stuff inside a guard which doesn't run if we're using Rake directly.

Right now the current workaround we've been using is

if ENV["fezzik_destination"]
  require "fezzik"
  require "path/to/fez/configuration.rake"
  ...
end

but this doesn't work in some case (for instance, when you run fez -T or anything else that avoids the code path that sets the fezzik_destination env variable.

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

1 participant