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

Unsure if I use processes correctly #1595

Closed
dmarcoux opened this issue Nov 19, 2024 · 2 comments
Closed

Unsure if I use processes correctly #1595

dmarcoux opened this issue Nov 19, 2024 · 2 comments
Labels
question Further information is requested

Comments

@dmarcoux
Copy link

dmarcoux commented Nov 19, 2024

Hello,

I have a project in which I want to run TailwindCSS CLI to watch for changes in styles. Here's an example of how I do this with a process in my devenv.nix file:

  processes = {
    # TailwindCSS watches for changes in styles and regenerates the CSS as needed
    tailwindcss = {
      exec = "${pkgs.tailwindcss}/bin/tailwindcss --config tailwind.config.js --input static/styles/main.css --output static/css/main.css --watch";
      process-compose = {
        # Set working directory
        working_dir = "src/sports_tracker";
      };
    };
  };

For some unknown reason, the process starts, then it is marked as completed with the exit code being 0. Nothing is shown in the process logs. What I would expect is TailwindCSS to keep on watching for changes. If I run the command in my shell, it works as expected.

Am I doing something wrong here?

Thank you for your help and devenv!

@dmarcoux dmarcoux added the question Further information is requested label Nov 19, 2024
@sandydoo
Copy link
Member

@dmarcoux, try adding process-compose.is_tty = true; to the process.

@dmarcoux
Copy link
Author

Thank you @sandydoo for the quick reply. This works now.

Have a good day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants