Skip to content

Commit 9008639

Browse files
authored
Set IN_GHCIWATCH for subprocesses (#222)
This makes it easy for subprocesses (e.g. Haskell code that runs in `ghci`) to determine if it's running in a `ghciwatch` process.
1 parent 2ff6f48 commit 9008639

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ async fn main() -> miette::Result<()> {
2424
opts.init()?;
2525
let (maybe_tracing_reader, _tracing_guard) = TracingOpts::from_cli(&opts).install()?;
2626

27+
std::env::set_var("IN_GHCIWATCH", "1");
28+
2729
let (ghci_sender, ghci_receiver) = mpsc::channel(32);
2830

2931
let (ghci_opts, maybe_ghci_reader) = GhciOpts::from_cli(&opts)?;

0 commit comments

Comments
 (0)