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

feat(core): add interactive env var #14994

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented Feb 14, 2023

Add a NX_INTERACTIVE env var that can be used from generators to determine if they can run interactive logic such as handling prompts.
Move the setting of NX_DRY_RUN to the yargs handler of the generate command so it is as visible as possible.

@vercel
Copy link

vercel bot commented Feb 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 15, 2023 at 4:24PM (UTC)

@AgentEnder
Copy link
Member

I really think some of this may make sense in a GeneratorContext object, but I know @FrozenPandaz has been against that in the past.

I imagine something like

export interface GeneratorContext {
  projectGraphSnapshot: ProjectGraph
  dryRun: boolean
  interactive: boolean
}

packages/nx/src/command-line/nx-commands.ts Outdated Show resolved Hide resolved
@AgentEnder AgentEnder merged commit 40deb00 into nrwl:master Feb 16, 2023
@Coly010 Coly010 deleted the core/add-interactive-env-var branch February 16, 2023 15:31
FrozenPandaz pushed a commit that referenced this pull request Feb 16, 2023
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

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

Successfully merging this pull request may close these issues.

4 participants